cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering results on Backoffice Advanced Search dropdowns based on certain criteria?

Former Member
0 Kudos

I would like to filter the values that appear in the advanced search dropdowns based on certain criteria (Eg. when searching for the country attribute, only show a subset of countries based on the current backoffice user's groups). Anyway of doing this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member632755
Active Contributor
0 Kudos

Hi,

you can use the mechanism of narrowing down values in all flavours of the reference editor. For example please check here. To get full flexibility we would have to add the dynamic forms mechanism to the advanced search. Unfortunately this is not planned yet.

Cheers, Wojtek

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi guys,

I have a similar requirement, need to filter dropdown list in a create-wizard component to show only users from specific group. I'm not sure how to pass a reference to the user group, below is snippet which works when I hardcode PK of the usergroup.

 <wz:property qualifier="manager" editor="com.hybris.cockpitng.editor.defaultreferenceeditor">
          <wz:editor-parameter>                                
                  <wz:name>referenceSearchCondition_groups_contains</wz:name>
                  <wz:value>8796166193157</wz:value>
          </wz:editor-parameter>
 </wz:property>

Former Member
0 Kudos

Found a solution on following link: https://answers.sap.com/questions/12761093/view.html, so just posting it in case someone finds it usefull:

        <wz:name>referenceSearchCondition_groups_contains</wz:name>
        <wz:value>{@userService.getUserGroupForUID('managerGroup')}</wz:value>   

Former Member
0 Kudos

Wow great find! Didn't know you could link in service beans from here.