cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Annotations for Sort Order in value help not working

6,648

Hi experts,

I want to add the Sort Order annotation to my value help for a Selection Field in my List Report app.

The required annotations under UI.PresentationVariant are SortOrder, RequestAtLeast and Visualizations.

I have used this successfully on the table to sort my rows by the ID field. But when adding these annotations for Selection Field value helps, the annotation for Visualizations->Item->AnnotationPath is empty. I am expecting @UI.LineItem.

I am using a SEGW OData project to expose my CDS view. Do I need to do anything to the GetEntitySet method for this entity?

Does anyone know how to make sorting work in value help lists for selection fields in a List Report Fiori Elements app?

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

Joseph_BERTHE1
Active Contributor
0 Likes

Hello,

The workaround would be to redefine the get_entityset from the DPC_EXT and apply the sort.

Regards,

mdcastle
Active Participant
0 Likes

The order of options in the value help is defined by the order in which the values are retrieved in the CDS view that provides the options for the value help. If your value help CDS view has a key and text you could drive the order by ensuring the key was correctly ordered based on what you wanted to see in the value help.

So for example if your key values were 1 and 2, the corresponding text for 1 should show before 2 in the value help. I can share an example of this if that would help?

RaminS
Active Participant
0 Likes

There is no way of sorting the Value Help list.

As per Thorsten's comment, it was not supported in Feb, and it's still not supported in July 2021.

tlange
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Matthew,

UI.PresentationVariant isn´t support on the value help table yet.

Best regards,

Thorsten

Thanks for your response Thorsten. Is there any way to do this from the CDS view instead?

WRoeckelein
Active Participant
0 Likes

matthew.kennedy2 This might become available in 1.98

tlange
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi matthew.kennedy2

SAP Fiori elements floorplans for OData V4 support the sorting via UI.PresentationVariant on a Value help since UI5 1.89 (see https://sapui5.hana.ondemand.com/#/topic/a5608eabcc184aee99e1a7d88b28816c)

SAP Fiori elements floorplans for OData V2 should support if from UI5 1.98 as well.

Best regards,

Thorsten