flow variable to display user name

sparkles
Tera Contributor

Hi,

I created flow variable so I can use it to display user name in the description field. However I am getting nothing.

This is how i set it up:

 

sparkles_0-1741815605770.png

sparkles_1-1741815652531.png

this is the result (I am getting the email but not the name): 

 

sparkles_2-1741815910687.png

 

 thanks!

 

1 ACCEPTED SOLUTION

@sparkles 

I could see it doesn't work

Use Lookup Record on sys_user within your for each with condition as

SysId == For Each->MRVS->User

Then use output from Lookup Record and dot walk to Name field in next step

AnkurBawiskar_0-1741872057979.png

 

AnkurBawiskar_1-1741872095862.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

sparkles
Tera Contributor

@Ankur Bawiskar 

I created multirow variable that contain user name and email and name. 

user name is a reference field

email is a string field 

name is a string field 

this works perfect, however it display on the portal same name twice (see below) 

sparkles_0-1741868669139.png

So I thought to remove name field from the variable set and try to get the description to display name and email via the flow but i have no luck. By the way hiding the name variable didn't work as it still showing on the display list

thanks!

 

P.S. its a service catalog task

@sparkles 

User name is reference to sys_user so it will always show data from name field

Reason is because on sys_user name field is Display=true

It's platform behavior.

So please don't use name variable within MRVS

Even if you hide it will still show for the older RITMs, after hiding if you submit fresh RITM it will be hidden

You can use For Each on MRVS and then dot walk the Reference variable and then get Name from it

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

This is the option I have, selected user and got the same result, display user sys id

sparkles_0-1741871441622.png

no option to dot walk

 

@sparkles 

As per your image User variable is string, keep it Reference only

Inactivate Name variable within MRVS

Then you should be able to dot walk

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@sparkles 

I could see it doesn't work

Use Lookup Record on sys_user within your for each with condition as

SysId == For Each->MRVS->User

Then use output from Lookup Record and dot walk to Name field in next step

AnkurBawiskar_0-1741872057979.png

 

AnkurBawiskar_1-1741872095862.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader