Custom picker for Searching users

Hi,

I have a requirement to create a search filed for searching users List. The users list is getting from an Query Rule(table from DB) not from any groups.

I have achieved this by using the following code.

Code:

a!pickerFieldCustom(
label:"Select Re-assignee",
maxSelections:1,
suggestFunction: rule!ucArrayPickerFilter(
filter:_ ,
labels: local!reassignChoiceLabel,
identifiers: local!reassignChoiceValue
),
selectedLabels:a!forEach(
items: local!selectedAssignee,
expression: index(touniformstring(local!reassignChoiceLabel), wherecontains(fv!item, touniformstring(local!reassignChoiceValue)))
),
value:local!selectedAssignee,
saveInto:local!selectedAssignee,
labelPosition:"ADJACENT",

)

-----------------------------------------

rule using in the suggest function

rule: ucArrayPickerFilter

I'm getting the user's list while searching with User Names(below snippet) but my requirement is, i should get users list even if we search with an user id (both user name and user id should work).

 

Please suggest.

Thanks in advance

  Discussion posts and replies are publicly visible