Page 1 of 1

How to close confirmation dialog or update its text if...

Posted: 01 Dec 2017 14:15
by kosamja
If global variable is used in confirmation dialog text, is it possible to close confirmation dialog or update its text when that variable changes? Example if variable changes value from 1 to 2 to display that new number in confirmation dialog or to exit dialog when number is changed?

Re: How to close confirmation dialog or update its text if..

Posted: 02 Dec 2017 09:28
by Desmanto
It is possible, you have to create a loop in the main flow which utilize the confirm dialog. Put the back button as confirm with false, operation cancel. Add a new expression to check the operation. If it is cancel, loopback to the confirm dialog.

At another flow, use trigger Global Variable, and use Control UI to press back() when it detect the the confirm dialog is exist. One of the way can be

Code: Select all

if(existsElementById("android:id/button1"))
  back();
This way, when the GloVar changet, it will trigger this control UI. Only if the confirm dialog is open, then it will press back, which then confirm with false, operation cancel. It will then loopback to the confirm dialog again in the main flow, but load up with new GloVar value.

Re: How to close confirmation dialog or update its text if..

Posted: 02 Dec 2017 12:59
by kosamja
works, thanks