I want to use the same element as different buttons and was wondering what's the best way. I want to do this to avoid having a lot of elements and affecting the performance of my super heavy prototype. Can this happen or should I have to create 3 different buttons and hide/show them? (I was trying to avoid that)
The scenario is the following:
Button A.1: reads "Review Payroll". I setup an On click interaction of:
- Set text to: "Submit Payroll"
- set variable value to a global value to 1
- set a DP to show screen A.
Button A.2: now reads "Submit Payroll". I setup a condition so that if the global variable value is 1, then this happens:
- On click set a DP to show screen B.
-Set text to change the name of the button to "Go to Dashboard" and some other things like move the button, since the label will make the size change.
- Set GVAR to 2.
Button A.3: now reads " Go to Dashboard". I setup a condition so that if the GVAR is 2, then this happens:
- On click set a DP to show screen C.
The problem is that this is not working and the first time the user clicks, it goes directly to the last option... My workaround was creating 3 different buttons and showing/hiding them, but wanted to avoid that, so was wondering if there was a way of making this work...
I'm attaching an image for more details...