cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements ValueHelp Sorting

ChristianKloy
Explorer

Hi,

I have an Fiori-Elements-App with local Annotations. I have created an entity that is used as a ValueHelp.

Like this:

<Annotations Target="Metadata.ZMainEntity/ZReferenceID">
                <Annotation Term="Common.ValueListWithFixedValues" Bool="true"/>
                <Annotation Term="Common.ValueList">
                    <Record Type="Common.ValueListType">
                        <PropertyValue Property="CollectionPath" String="ZVHSet"/>
                        <PropertyValue Property="SearchSupported" Bool="true"/>
                        <PropertyValue Property="Parameters">
                            <Collection>
                                <Record Type="Common.ValueListParameterInOut">
                                    <PropertyValue Property="LocalDataProperty" PropertyPath="ZReferenceID"/>
                                    <PropertyValue Property="ValueListProperty" String="Id"/>
                                </Record>
                                <Record Type="Common.ValueListParameterIn">
                                    <PropertyValue Property="LocalDataProperty" PropertyPath="ZReferenceID"/>
                                    <PropertyValue Property="ValueListProperty" String="ZReferenceID"/>
                                </Record>
                                <Record Type="Common.ValueListParameterDisplayOnly">
                                    <PropertyValue Property="ValueListProperty" String="Id_Text"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                        <PropertyValue Property="FetchValues" Int="1"/>
                    </Record>
                </Annotation>
            </Annotations>

That works as expected. Now I try to add a sorting on the ValueHelp on a specific property. I defined an PresentationVarient and add the reference to the ValueHelp.

<Annotations Target="Metadata.ZVHSetType" Qualifier="MySorter">
 <Annotation Term="UI.PresentationVariant">
 <Record>
 <PropertyValue Property="Text" String=""/>
 <PropertyValue Property="SortOrder">
 <Collection>
 <Record Type="Common.SortOrderType">
 <PropertyValue Property="Property" PropertyPath="ZDescription"/>
 <PropertyValue Property="Descending" Bool="false"/>
 </Record>
 </Collection>
 </PropertyValue>
 </Record>
 </Annotation>
 </Annotations>

But now the field dont appears.

I debugged this and found the following line. So this feature not supported anymore? Is there an other way to sort values in a FixedValueHelp (ComboBox) ?


// TODO: to be removed in the next release! - Ignore ValueList with PresentationVariantQualifier
if (oResolvedAnnotation.annotation && !oResolvedAnnotation.annotation["PresentationVariantQualifier"]) {
this._enrichValueHelpAnnotation(oResolvedAnnotation, sParentFieldName);
// Check if there is no qualifier --> the default/primaryValueListAnnotation
if (!sQualifier) {
mAnnotation.primaryValueListAnnotation = oResolvedAnnotation;
} else {
// Set the qualifier on the resolved annotation
oResolvedAnnotation.qualifier = sQualifier;
mAnnotation.additionalAnnotations.push(oResolvedAnnotation);
}
}
tlange
Explorer

Hi Christian,

yes, unfortunately presentation variant for the value help table isn´t supported yet. My team is currently working on this topic. We will support sorting via presentation variant for the value help table in the near future.

Best regards,

Thorsten

RaminS
Participant
0 Kudos

Since sorting in Value Help isn't supported via presentation variant, is there another way to sort the Value Help lists?

What determines the sorting order? Is there a sorting order, or are values just being displayed in the order of which they have been entered in the underlying tables?

Would appreciate some help, as our client will not accept the default way the value help lists are displayed.

Thanks

deepak_pandey
Advisor
Advisor
0 Kudos

ramin.shafai I had faced similar issue in past. To resolve this and provide options to sort based on desired value help column, I had implemented Custom Entity as a Value Help. This way, you have maximum control over the Value Help, be it sorting or filtering.

ldubois1
Explorer
0 Kudos

Any update to this from SAP?

Accepted Solutions (0)

Answers (0)