cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori elements default filter with SelectionVariant not working

1,063

In my fiori elements list report app I am using the following annotation to add a filter lbkum !== 0 as a de fault value. It is not working:

<Annotations Target="SAP.EntitySet">
	<Annotation Term="UI.SelectionVariant">
		<Record>
			<PropertyValue Property="SelectOptions">
				<Collection>
					<Record Type="UI.SelectOptionType">
						<PropertyValue Property="Ranges">
							<Collection>
								<Record Type="UI.SelectionRangeType">
									<PropertyValue Property="Option" EnumMember="UI.SelectionRangeOptionType/NE"/>
									<PropertyValue Property="Low" Decimal="0.000"/>
									<PropertyValue Property="Sign" EnumMember="UI.SelectionRangeSignType/I"/>
								</Record>
							</Collection>
						</PropertyValue>
						<PropertyValue Property="PropertyName" PropertyPath="lbkum"/>
					</Record>
				</Collection>
			</PropertyValue>
		</Record>
	</Annotation>
</Annotations><br>

When I use the following annotations to set a default filter value salk3 === 0, it works:

<Annotations Target="SAP.EntitySet/lbkum"><br>	<Annotation Term="Common.FilterDefaultValue" Decimal="0.000"/>
</Annotations><br>

I am developing this on Business Application studio. Do I need to deploy this to a proper launchpad to see the default filter? What is missing here?

Thanks.

junwu
Active Contributor
0 Kudos

what's the version of your ui5?

0 Kudos

I am on version 1.96.1

View Entire Topic
breinelt
Explorer
0 Kudos

Hello All, 

If someone is still searching for a solution, you need to define the annotation in the manifest file. This worked for me:

breinelt_0-1719905118824.png

Described here:

https://sapui5.hana.ondemand.com/sdk/#/topic/49a6ba5b8d6946208322a9f7e16837c2

Regards,

Bettina