cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Annotations Filter / FilterRestrictions showing Combobox instead MultiCombobox (single-value)

ct-ch
Explorer
0 Kudos
1,109

Hi there

I've written a small SAP Fiori app with SmartFilter and SmartTable, and I'm using annotations. The problem I have is the type of the filter smart fields. They're looking as MultiCombobox instead Combobox (single value selectable).

These are my annotation settings:

			<Annotations Target="Metadata.ZPM_BP_NORECOMM_LIST_SRV_Entities/PlantSet">
				<Annotation Term="Capabilities.FilterRestrictions">
					<Record Type="Capabilities.FilterRestrictionsType">
						<PropertyValue Property="FilterExpressionRestrictions">
							<Collection>
								<Record Type="Capabilities.FilterExpressionRestrictionType">
									<PropertyValue Property="AllowedExpressions" String="SingleValue"/>
									<PropertyValue Property="Property" PropertyPath="Werk"/>
								</Record>
							</Collection>
						</PropertyValue>
					</Record>
				</Annotation>
			</Annotations>

And here my smart filter bar settings:

				<sem:headerContent>
					<smartFilterBar:SmartFilterBar
						id="smartFilterBar"
						entitySet="VehicleSet"
						liveMode="true"
						persistencyKey="blsConfirmationSmartFilterPKey">
					</smartFilterBar:SmartFilterBar>
				</sem:headerContent>

Nothing helped yet. Do someone has an idea how to fix that problem? I know there is also a way to define annotations on the backend system, but I prefere to do it on the frontend.

Thanks.

Cheers

Cengiz

View Entire Topic
TylerFincham
Explorer
0 Kudos

Hi Cengiz,

This wasn't easy but I got it working:

            <Annotations Target="SAP__self.Container/VerjaarConsignaties" >
                <Annotation Term="Capabilities.FilterRestrictions">
                    <Record Type="Capabilities.FilterRestrictionsType">
                        <PropertyValue Property="FilterExpressionRestrictions">
                            <Collection>
                                <Record Type="Capabilities.FilterExpressionRestrictionType">
                                    <PropertyValue  Property="Property" PropertyPath="Verjaardatum"/>
                                    <PropertyValue Property="AllowedExpressions" String="SingleRange"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
            </Annotations>