It's possibile?
If yes, how?
I've made another flow wich stop the main one some seconds before the input dialog timeout occurr,
but it's an ugly workaround.
Thank you !
Stop the input dialog action if timeout occurred.
Moderator: Martin
Re: Stop the input dialog action if timeout occurred.
Could you please clarify what you want to achieve?
Action Input Dialog has an option to specify a timeout. The variable operation will be set to value timeout when the dialog is closed by a timeout. You can use a condition Expression to check this and stop the flow (for example using script: operation=="timeout").
Regards,
Martin
Action Input Dialog has an option to specify a timeout. The variable operation will be set to value timeout when the dialog is closed by a timeout. You can use a condition Expression to check this and stop the flow (for example using script: operation=="timeout").
Regards,
Martin
Re: Stop the input dialog action if timeout occurred.
Sorry for my bad english:
if timeout occurred value is filled with "default" and the flow continues.
I'd like to stop the flow if a timeout occurred, and if it's possible , even if the "cancel" button (on the dialog window) is pressed.
( I'm re-reading the help page...)
So as you said I need a condition expression to check if "operation" is ="timeout" or "cancel" and in one of this case stop the flow.
Thank you for your patience!
if timeout occurred value is filled with "default" and the flow continues.
I'd like to stop the flow if a timeout occurred, and if it's possible , even if the "cancel" button (on the dialog window) is pressed.
( I'm re-reading the help page...)
So as you said I need a condition expression to check if "operation" is ="timeout" or "cancel" and in one of this case stop the flow.
Thank you for your patience!
Re: Stop the input dialog action if timeout occurred.
As Martin pointed out, the key is in the {operation}. This variable can have 3 possible value
1. "ok", You put in proper input (before timeout) and press OK
2. "cancel", You press cancel button (before timeout) or press back button.
3. "timeout", you didn't put anything or press OK or cancel until timeout
If you like to continue the flow, ONLY if you put proper input (before timeout), use expression
I use this kind of expression so far, for 25+ times, not including the variant of it. I usually put it after the input dialog, to protect the rest of the flow from executing, if timeout or I cancel it.
1. "ok", You put in proper input (before timeout) and press OK
2. "cancel", You press cancel button (before timeout) or press back button.
3. "timeout", you didn't put anything or press OK or cancel until timeout
If you like to continue the flow, ONLY if you put proper input (before timeout), use expression
Code: Select all
operation == "ok"
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Stop the input dialog action if timeout occurred.
@Martin can you add option to change Variable name in input dialog. Sometimes i use more than 1 input dialog and need to change default Variable by using script/expression.
Re: Stop the input dialog action if timeout occurred.
@anuraag This is on my list of features under consideration. For the time being you have to add an action Script after the input dialog action and assign the variables to another variable before you show the next dialog.
Re: Stop the input dialog action if timeout occurred.
+1 for this. Although we can simply assign it first to other value, sometimes, giving it direct variable name is simpler.
Meanwhile, most of my flow which need multiple input dialog dialog consecutively, usually protected by the operation == "ok", but added up another value assignment. So if I have 3 input dialog, I usually have 3 expression also after each input dialog, with at least 2 of them (sometimes just all of them) have the value assignment.
2nd expression
3rd expression
later you can usee choice_level1, 2, 3 in the next step.
Meanwhile, most of my flow which need multiple input dialog dialog consecutively, usually protected by the operation == "ok", but added up another value assignment. So if I have 3 input dialog, I usually have 3 expression also after each input dialog, with at least 2 of them (sometimes just all of them) have the value assignment.
Code: Select all
choice_level1 = value;
operation == "ok";
Code: Select all
choice_level2 = value;
operation == "ok";
Code: Select all
choice_level3 = value;
operation == "ok";
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Stop the input dialog action if timeout occurred.
I am doing same now. Changing variable name inside expression.
It will be also nice to have an option inside input dialog to abort/stop flow on cancel/timeout. This will help us to no more use additional expression.
It will be also nice to have an option inside input dialog to abort/stop flow on cancel/timeout. This will help us to no more use additional expression.