Custom Flow Actions

indrajeetma
Tera Guru

I am creating an custom flow action... I am sending inputs from catalog of variable for eg 'Device Name' have 2 choices one is Laptop (lap) and Desktop (desk) its like label and its backend name nd i want Device Name input into custom action and will return according to the Device Name input so tell me now when i will call the action from Flow Desginer and give input drag and drop Device Name it will send backend name or display value so i can run script in custom action like if(inputs.device == lap) or if(inputs.device == Laptop)??

1 ACCEPTED SOLUTION

Juhi Poddar
Kilo Patron

Hello @indrajeetma 

To get the value from flow designer use the condition 

 

var name = fd_data.trigger.request_item.variables.device_name; //to return backend value(lap,desk)
return name;

 

or

 

var name = fd_data.trigger.request_item.variables.device_name.getDisplayValue(); // to return display value (Laptop, Desktop)
return name;

Result: 

JuhiPoddar_0-1733234352864.png

 

 

JuhiPoddar_1-1733234441209.png

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar

 

View solution in original post

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@indrajeetma The backend value will be sent in the script action if(inputs.device == lap)

 

Hope this answers your question.

How i can send the label value as input?

var name = fd_data._1__get_catalog_variables.device_name.getDisplayValue();
return name;
getting null as output.

Juhi Poddar
Kilo Patron

Hello @indrajeetma 

To get the value from flow designer use the condition 

 

var name = fd_data.trigger.request_item.variables.device_name; //to return backend value(lap,desk)
return name;

 

or

 

var name = fd_data.trigger.request_item.variables.device_name.getDisplayValue(); // to return display value (Laptop, Desktop)
return name;

Result: 

JuhiPoddar_0-1733234352864.png

 

 

JuhiPoddar_1-1733234441209.png

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar