How to get the variable values in flow designer

Sriram Pusuluri
Tera Contributor

Hi Team,

 

I have a flow designer, Once I submit the item, Ritm and sc_tasks are creating.

 

Now in sc_task short description I want to add one of the variable value in it.

 

SriramPusuluri_0-1766584428894.png

 

I have added above one in my flow designer Action, this is coming in below way

SriramPusuluri_1-1766584484270.png

 

Below is how my variable values are showing in catalog form

 

SriramPusuluri_2-1766584524320.png

 

How to do this? Do I need to create any other Action

 

 

1 ACCEPTED SOLUTION

@Sriram Pusuluri 

1 thing to check -> if that variable is select box then why it shows Search Icon

try this other way in script

Also check if there is any space in the variable name

var choiceLabel = fd_data.trigger.request_item.variables.addon_licence_project.getDisplayValue();
return choiceLabel;

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

View solution in original post

20 REPLIES 20

@Ankur Bawiskar 

Flow variable is showing as empty.

 

SriramPusuluri_0-1766728962552.png

Below is my flow for one task, which I am trying now

SriramPusuluri_3-1766729159354.png

 

 

SriramPusuluri_1-1766729056558.png

 

SriramPusuluri_2-1766729111115.png

 

 

@Sriram Pusuluri 

1 thing to check -> if that variable is select box then why it shows Search Icon

try this other way in script

Also check if there is any space in the variable name

var choiceLabel = fd_data.trigger.request_item.variables.addon_licence_project.getDisplayValue();
return choiceLabel;

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar  

 

This one is working, apart from this, I have total 10 tasks in this item,  Do I need to create different flow variables or can I use same one which I have already created?

 

in 10 Tasks 8 are select box, 2 are Reference Type

@Sriram Pusuluri 

Glad to know that my script worked.

1 flow variable can be reused throughout the same flow.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar 

 

For Reference we need to create new Flow Variable with type as Reference right