Hi All,
my requirement is to replace the existing drop down field with a search field.
The drop down will fetch the usernames from a rule. So due to increasing of user's in the rule we want replace with a searchbox rather than a Dropdown field.
Existing drop down field and code
Code:
a!dropdownField( label: "Select Re-assignee", placeholderLabel: "All", choiceLabels: local!reassignChoiceLabel, choiceValues: local!reassignChoiceValue, value: local!selectedAssignee, saveInto: local!selectedAssignee, labelPosition: "ADJACENT", )
Note: I'm saving all the required users list into a local variable local!userList.
I'm trying to fetch the list using a Find User picker but I'm getting all the application user's, but i need only the users from the local variable local!userList.
a!pickerFieldUsers( label: "Select Re-assignee", labelPosition: "ADJACENT", maxselections: 1, value: local!userList, saveInto: { local!selectedAssignee, } ),
Please help me in this
Discussion posts and replies are publicly visible
Hi, You can make use of "Group Filter" Parameter. For that you can add the required users list in a particular group and the constant related to that group you can pass over here. Attached is the sample code.a!pickerFieldUsers( label: "Select Re-assignee", labelPosition: "ADJACENT", maxselections: 1, groupFilter: cons!ABC_GRP_USERS, value: local!selectedAssignee, saveInto:local!selectedAssignee, )
a!pickerFieldUsers( label: "Select Re-assignee", labelPosition: "ADJACENT", maxselections: 1, groupFilter: cons!ABC_GRP_USERS, value: local!selectedAssignee, saveInto:local!selectedAssignee, )
yes we can do, but I'm fetching the user's list from a data table using a Query entity rule. In need to fetch the user's list from that QE rule.. Please suggest??
Follow this recipe https://docs.appian.com/suite/help/20.3/recipe-configure-an-array-picker.html should get you started.
You may not need to if you're going to upgrade to 20.3 or later. They introduced the ability to type ahead into all regular dropdown components with more than twelve options. Yours will be backwards compatible, so you may have to tweak a little bit, but if you're already planning the upgrade, check it out and see if that's the component that meets your needs best.
yes, but we are still using 20.2
Unfortunately it isn't possible to use the results of a query to filter the user list in a user picker. One option is using a custom picker, but it is a little more effort than just using the pickerFieldUser..
Many thanks Pal..It worked for me
Hi Stephen,
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.
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
My suggestion is to use the filter() function and a supporting expression inside ucArrayPickerFilter to search for items as you like.
Please suggest with an example code..it helps a lot