Retrieve User ID in Flow Designer from a user select list variable

trmcclain
Tera Contributor

We currently have automation set up between our SN instance and Jira which allows us to add users to application access groups once a task is created for our assignment group. In this instance using 

fd_data.trigger.current.variables.users.getDisplayValue() is sufficient.
However while trying to design similar automation for a different toolset, I need to be able to grab the underlying user id (in my company's case a 6 digit alphanumeric) from the 'users' variable.
I can get the sys_id of the values if I drop the getDisplayValue(), but from there I haven't been able to successfully transmute it into the user Id I need. On top of that I can't even see the class to realize what kind of object I'm dealing with. 
Can anyone point me to a good resource to assist in this regard?
I can provide more context if needed.
The code I'm using currently is very basic:

 

var names = fd_data.trigger.current.variables.users.getDisplayValue()//user variable
var just = fd_data.trigger.current.variables.business_justification_program_requirements.getDisplayValue();

var desc = just+"\nUsers: "+names;

return desc

 

6 REPLIES 6

Elijah Aromola
Mega Sage

Assuming variables.users is a reference, you should be able to dot walk directly to the value.

 

fd_data.trigger.current.variables.users.user_id // or whatever the field name is

If it's not a sys_user reference what is the data type of that variable?

 


@Elijah Aromola wrote:

Assuming variables.users is a reference, you should be able to dot walk directly to the value.

 

 

fd_data.trigger.current.variables.users.user_id // or whatever the field name is

 

If it's not a sys_user reference what is the data type of that variable?

 


How can I check the data type? Using the typical javascript '.className' always come back undefined.

Can you share the config for the variable?

trmcclain_0-1705351059270.png