Form update on button click inside form


I have 4 text boxes inside form eg: txt1, txt2, txt3 and txt4 of numeric type and 1 button of click type.

On click of button inside form can I read data from txt1, txt2, txt3 and multiply all the three values and display it in txt4?

Can anyone please help me if it is possible.

Welcome to the UiPath Community @Pavan_Kumar_A

Surely yes

Just add the advanced logic using javascript on that text box and trigger it with the button click

  1. Use the button component and change the type to click
  2. Add the advanced logic for the last textbox which will have the logic that checks the button was clicked
  3. And the logic should be of value type and returns the value of the addition of the three data fields.

Accessing data fields can be accessed in javascript editor using data.fieldKey

Hope this helps.

There’s a tutorial on using the advanced condition using javascript, this might help a bit too

UiPath Form - Advanced Condition using Javascript

Happy Automation!

1 Like

Yes and it’s easy. No logic required. You can set the button NOT to close the form when it’s clicked. Then when it’s clicked it runs what’s in the Create Form’s Do block. In that block you check which button was clicked, do the calculation, and assign the result to txt4’s variable. As long as that variable is set to In/Out the form will update when the value of the variable updates.

This is a similar exercise that will help.

Note that in step 2, they missed a step. They didn’t put variables into the Value columns - you must do this or it won’t work.

1 Like

Hi Paul and Rahul,

Thanks for the reply. I will try with both the suggestion and update here.


Thanks Paul

Your suggestion worked perfectly fine for me.

Thanks Rahul for your suggestion too, I will try your suggestion sometime in the future for learning purpose.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.