Can we re use same screen action with two different button is a screen

Hi All,


It is possible to use same screen action from different buttons in a same Screen. But can we have any flag set / argument passed when a click on a certain button is performed to know which button was clicked and based on the click, we can perform action and reach a specified destination accordingly.


For example: if i have a Save and Save & New button in Amenity (Booking Assignment), i can set screen action called "Save" to both buttons, however, need to know how we can set a flag / send an argument which can be used in Screen Action to know which button click, and re-route to specific destinations according to the button clicked.

Thanks,

Anup Sagar G

Hi, 

You can set input parameter in screen action , then your would pass to value in input parameter at every button. 

apply if condition in screen action to identify  value from which button this input parameter value came and you can perform action according to that button. 


Thanks 

Solution

Hi Anup,

Yes, you can use screen action with different button with in same page.

You can take Input Paramater in Screen action and set If else condition or can use switch based on condition and apply logic.

like below image-


and within action 



same screen action uses by many buttons and links.


Hope this will help you.

Regards

Rahul Sahu

Solution

Thank you @Rahul Sahu

Anup Sagar G wrote:

Hi All,


It is possible to use same screen action from different buttons in a same Screen. But can we have any flag set / argument passed when a click on a certain button is performed to know which button was clicked and based on the click, we can perform action and reach a specified destination accordingly.


For example: if i have a Save and Save & New button in Amenity (Booking Assignment), i can set screen action called "Save" to both buttons, however, need to know how we can set a flag / send an argument which can be used in Screen Action to know which button click, and re-route to specific destinations according to the button clicked.

Thanks,

Anup Sagar G

Hi Anup,

You can create a local variable on the screen of property boolean. In the flow actions, you can assign the value to that boolean property and after that you can add an if condition and use that boolean property to end into 2 end statements. 

Thanks,

Divyanshu Pathak