LookUp Select box variable value should show Sys Id

Sruthi18
Tera Contributor

Hi all, 

In record producer , I have created a variable of type: Lookup Select Box , referring to the "sys_user" table.
Also given the reference qualifier , where I need to get the members of the particular group to be shown.
So when I select any value , then in the question answer table , I am seeing the display value (Name)

How can I get the sys ID of the user selected on this variable ?

I need Sys Id to use it in Flow designer to send an approval.

Like this there are almost same 10 variables where I need to select an user in the variable and send an approval for each user in different conditions .(i.e., 10 times approval will trigger) and get the Approval comments , date & time , state .
 
Please help me the easiest way to use this.

I can script it by doing GlideRecord to the user table. But what if there are many with the same name. Hence help required.

Also , it is mandatory to take only "LookUp SelectBox" as type. Other type of variable is strictly restricted.

 

 

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Sruthi18 Configure your Looks up Select box variable as follows and the sys_id the user would start appearing in the value field on the question answer table.

 

Screenshot 2024-04-05 at 11.27.26 PM.png

Please mark the answer helpful and correct if it manages to answer your question.

View solution in original post

2 REPLIES 2

Sruthi18
Tera Contributor

Conditions :
Lookup table : sys_user
Lookup Field : Name
Include None :TRUE

Reference qualifier :javascript&colon;'active=true^sys_idIN'+getIDs("<Group SysID>"); function getIDs(grp){var mem=GlideUserGroup.getMembers(grp);var ids=''; while (mem.next()){ids+= (mem.user+',');} return ids;}


Sandeep Rajput
Tera Patron
Tera Patron

@Sruthi18 Configure your Looks up Select box variable as follows and the sys_id the user would start appearing in the value field on the question answer table.

 

Screenshot 2024-04-05 at 11.27.26 PM.png

Please mark the answer helpful and correct if it manages to answer your question.