I need two 'When button1 click' blocks

I want to use two ‘When button1 click’ blocks for performing two different functions based on previous activity, Is there any way to do this,
and how can I add 'When button2 click inside 'When button1 click?
thanks in advance.

Hi
You should never have to use more than one event handler for the same event.
Can you please give us a description of what you are trying to achieve so that we can help you out better?
I’m sure there is a way to do what you want with just one event block

1 Like

Can I add “when button2.click” inside “when button1.click”? how?

The Button component has a method called “click”. It simulates a user clicking on the button, and triggers the click event. Maybe you can try that

Can you please tell us the purpose. After that may be i can provide you the solution

Ok, let me explain,
I have 2 buttons Button1 and Button2.

  1. when I click Button1, textbox1 and Button3(OK) will be made visible and after entering into textbox, when I click Button3(OK) text is shown in Label1.
  2. when I click Button2, textbox1 and Button3(OK) will be made visible and after entering into textbox, when I click Button3(OK) text is shown in Label2.
    so, I need two different action when I click Button3(OK) based on whether I clicked Button1 or Button2 in previous step.
    hope its not confusing.
1 Like

You can do it using global variable… When button one click set global variable 1 then tectbox visible & Button 3 visible… & for button 2 set global variable 2 . in this way you can compare which button pressed by the user. @sandesh97h

4 Likes

thankyou, I will try that.

ya & please mark my ans as solution so that other will also use this types of logic… @sandesh97h

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