Which button did the user select in Forms activity?

@MDS @1hunna

I think I have found my answer - just to clarify, I am looking at the new forms, in version 2023.4+

And the answer is that UiPath have completely re-done the concept of forms in the Triggered attended automation framework.

There is a course on the Academy that’s called Attended Automation Framework Triggers and Forms in Studio (v2023.4) and it tells you all about how the new forms are used.

Here is also a link to a youtube video that explains the scenario

In short, you don’t need to retrieve an argument that tells you which button was clicked, you need to build a separate sequence with a trigger which will monitor the button clicking and execute a sequence once the button is clicked. You will need UiPath.Form.Activities for this.

In my example, I had a Submit and Reject button. I created a new trigger sequence and placed the trigger as the first activity in the sequence and got it to monitor the event “Submit clicked”. I created another trigger sequence for the “Reject clicked” event. Once you’ve got all of your triggers set up, you place a “Run Local Triggers” activity in the Main.xaml and when it’s executed, it will look for when a trigger is executed to continue with the relevant sequence.

image

I hope this helps.