cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic SemanticObject for Intent Based Navigation in Fiori List Report

imbhavik
Explorer
0 Kudos

Hi,

I have Fiori List Report based on the CDS view and annotations. I have added below annotations for the intent based navigation as well.

@Consumption.semanticObject: 'SemanticObjectName'

@UI.lineItem: [ { position: 10, label: 'Document Number'},

{type: #FOR_INTENT_BASED_NAVIGATION, semanticObjectAction: 'display'}]

key DocumentNo

It works fine as I have hardcoded the semanticObject name in the annotation.

However, in my use case, I need to use the SemanticObject name from one of the fields in the CDS view as each record could have different semanticObject and action.

So, instead of hardcoding the name, how can I pass from the element within the CDS view?

If this can't be achieved through CDS view annotations, my another option would be to add custom code in List Report application in the controller.

For this, I need to know the event name which is being triggered when user clicks on the number ( which is formatted with the link for navigation due to the above annotations). If we know the event and if I know how to extend that event, I can put together a code to navigate to specific intent by reading the table fields and generating the correct intent and action.

Let me know if any one have any ideas or directions in which I can go to resolve this.

Thank you,

Bhavik

Accepted Solutions (1)

Accepted Solutions (1)

Captain-León
Advisor
Advisor
0 Kudos

Hi Bhavik,

that seems solved in the meantime, I needed this feature and it is working in my case now:

Here the relevant part of annotations.xml:

 

 

                        <Record Type="UI.DataFieldWithIntentBasedNavigation">
                            <PropertyValue Property="Value" Path="AppName" />
                            <PropertyValue Property="SemanticObject" Path="AppSemanticObject" />
                            <PropertyValue Property="Action" Path="AppAction" />
                        </Record>
 
Both OData field/properties "AppSemanticObject" and "AppAction" are having different values at runtime for different entries in the table/list. And on Fiori Launchpad navigation into different apps is working fine dynamically for different rows in the fiori table.
 
Best regards
Michael 
 
ishiagrawal
Associate
Associate
0 Kudos

Hi Michael,

Great to hear that the feature is working for you now! I'd love to learn more about your implementation of dynamic SemanticObject for Intent-Based Navigation in Fiori List Report. Understanding your approach and the specifics of how you achieved this dynamic functionality would be really insightful. Could you provide more details on how you set up the dynamic SemanticObject and Action for different entries in the table/list? I'm also currently working on a task that involves implementing a similar feature: Dynamic SemanticObject for Intent Based Navigation in a Fiori List Report within the OData v4 RAP framework.

Best Regards,

Ishita

imbhavik
Explorer
0 Kudos

Hi Michael,

 

Sorry for not getting back to you. I have been diverted to other project and could not look into this. However, I have started looking into this once again.

 

Glad that you could achieve it at your end. Can you please provide more details on the local annotations which you mentioned and how you can integrate when user clicks on the link on one of the fields from the table?

 

Thank you,

Bhavik

Answers (3)

Answers (3)

Captain-León
Advisor
Advisor
0 Kudos

Hi Bhavik,

as mentioned above, here the local annotations:

 

                        <Record Type="UI.DataFieldWithIntentBasedNavigation">
                            <PropertyValue Property="Value" Path="AppName" />
                            <PropertyValue Property="SemanticObject" Path="AppSemanticObject" />
                            <PropertyValue Property="Action" Path="AppAction" />
                        </Record>
 
The App* fields are the OData elements with the values at runtime, each table entry different values.
 
Best regards
Michael
imbhavik
Explorer
0 Kudos

Hi Michael, First I am trying to make it work with static intent based navigation. After that, I will change with above in local annotations to see dynamic works fine. However, with static one, I am not getting the link on the Object ID field in the table in the List report. I tried checking everything but could not find what is wrong.

 

Below are the details:

CDS View annotations:

imbhavik_0-1714074835576.png

Below how it looks where I am missing link on the Object Number field.

imbhavik_0-1714075507630.png

 

Am I missing anything above or specified anything incorrectly?

Thank you,

Bhavik

 

imbhavik
Explorer
0 Kudos

Hi Michael,

 

I fixed the static navigation. Looks like, I used navigation type in Annotation as "FOR_INTENT_BASED_NAVIGATION" and it was not working. When I used "WITH_INTENT_BASED_NAVIGATION" then it worked.

However, the ID name in target app is different than the one in Source app. So, how can we specify the target app ID parameter?

 

THank you,

Bhavik 

imbhavik
Explorer
0 Kudos

Hi @Captain-León 

 

I have finally tried with above local annotations you have provided. However, at runtime, I get null values for AppSemanticObject & AppAction which you have mentioned in your annotations. I did preview of the CDS view data and checked ODATA values at runtime and it is providing correct values in above ODATA fields.

 

Not sure why above two fields are not getting values when I click on the link from the table?

Any pointers to check?

Thank you,

Bhavik

 

gregorw
Active Contributor
0 Kudos

Hi Bhavik,

have you tried to solve this issue with a local annotation pointing to an attribute of your OData Entity that contains the Semantic Object as a dynamic value:

But that might still be an issue as the Mapping target currently doesn't support Path as a source. Check this issue: Allow PropertyPath and String for SemanticObjectProperty attribute of SemanticObjectMappingType #267Best Regards
Gregor
imbhavik
Explorer
0 Kudos

Hi Gregor,

I have not tried it yet. I got diverted to another project and could not continue on this. However, I have started looking into this again.
I will let you know how it goes. I will definitely try with above approach as well as what Michael has proposed.

 

Thank you,

Bhavik

sandeep_rs
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

No this is not supported yet and would need to be planned as a feature request!

Best Regards,

Sandeep

imbhavik
Explorer
0 Kudos

Thank you for letting me know that it is not there yet.

Can we do it through custom code though? I do not know the event name which gets triggered when we click on the number hyperlink in the column. If you know and share, I can try to leverage from the custom controller.

Let me know.

Thank you,

Bhavik