Need to show popup on first time the button clicked. Second time i need to do another action

Hi Team,

Requirement: Need to show popup on the first time the button clicked. The second time on click of the same button I need to do another action.

Can you please help me here.

Hi!

There are a bunch of ways to do this, most of which will require conditional logic. But you can do it without such logic by doing this:

Create a two-state dynamic panel with an identical looking button in each.

OnClick (of button in State1)
  -- perform first desired action
  set state of dynamic panel to State2

OnClick (of button in State2)
  -- perform second desired action

If, however, this button is on a page you navigate away from and then return to, the button will revert to its first action. In that case you’d use just one button and conditional logic on a global variable, with its default set to 1. (You could also use this method in a single-page scenario.)

OnClick
  If value of (variable) buttonTest is equal to 1
    -- perform first desired action
    set (variable) buttonTest to 2
  Else if
    -- perform second action
1 Like

Hi Jose,

Thank you. It helped me.

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