cancel
Showing results for 
Search instead for 
Did you mean: 

smart filter bar and annotations

07-04-2020 11:28 AM
3928 views 6 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello

i am trying to create annotations to manage my smart filter bar

i am trying to show default values and create lists in my smart filter bar like this :

but i am getting anything. mys smart filter bar is the same and the "Basic group" is not there .

i dont know how to use lists in my smart filter bar and how to show default attributes .

should i change something in the backend ? (Odata Service).

and this is my annotations code :

	<Annotations Target="Metadata.requirement">
		<Annotation Term="UI.SelectionFields">
			<Collection>
				<PropertyPath>Solution_ID</PropertyPath>
				<PropertyPath>Branch_ID</PropertyPath>
				<PropertyPath>Scope_ID</PropertyPath>
				<PropertyPath>Element_ID</PropertyPath>
				<PropertyPath>Priority_ID</PropertyPath>
				<PropertyPath>Status_ID</PropertyPath>
			</Collection>
		</Annotation>
	</Annotations>
0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
SAP Champion
SAP Champion

Below snippet is from SDK sample.

<smartFilterBar:SmartFilterBar id="smartFilterBar" persistencyKey="UniqueAndStablePersistencyKey" considerSelectionVariants="true" entitySet="LineItemsSet" enableBasicSearch="true" basicSearchFieldName="Bukrs" showClearButton="true">

Have you specified entitySet property?

Former Member
0 Likes

yes this is my smart filter bar header:

<smartFilterBar:SmartFilterBar id="smartFilterBar" persistencyKey="UniqueAndStablePersistencyKey" entitySet="requirementSet" assignedFiltersChanged="onFiltersChanged" considerSelectionVariants="true" enableBasicSearch="true" basicSearchFieldName="Solution" showClearButton="true" useProvidedNavigationProperties="true">
			
<br>

thank youu

Former Member
0 Likes

My smart filter bar is working but i want to make some default selects in it and use show select fields .

MioYasutake
SAP Champion
SAP Champion

HI,

For select (dropdown list), you need annotation 'sap:value-list="fixed-values' like below.

<Property Name="DeliveryStatus" Type="Edm.String" MaxLength="1" sap:display-format="UpperCase" sap:label="Delivery Status"
                    sap:quickinfo="EPM: Sales Order Ordering Status" sap:value-list="fixed-values"/>

If you're using ABAP CDS, please take a look at the following blog.

https://blogs.sap.com/2018/11/16/dropdown-list-in-fiori-elements/

To set default values, below thread may be helpful.

https://answers.sap.com/questions/721120/default-value-in-smart-filter-using-annotations-or.html

Or, you could create variants and set default values there.

Answers (0)