Hi all,
i want to create a multi choice (two values) input dialog that "remember" the last choice every time i open it, but i have problems to do that.
Input dialog supplie a variable "value" that contains the choice made enclosed in [].
If i use this variable "value" in the field "default value" of input dialog, i expect that every time i open that input dialog i see last selected choice, but is not so.
How I can make this working?
Input dialog default value
Moderator: Martin
Re: Input dialog default value
It works for me. Put a variable with a list of options in the List Values parameter and the already selected ones in the Default Value parameter.giovag7 wrote:If i use this variable "value" in the field "default value" of input dialog, i expect that every time i open that input dialog i see last selected choice, but is not so.
How I can make this working?
Make sure both variables contain a comma separated list of options, the second variable should of course contain some strings from the first to select.
And put both variables in curly braces like {var1}.
Re: Input dialog default value
Sorry, but i can't understand how to use variable containing list {list,listformat,comma}. In my flow i simply used a text list "Option1, Option2". Could you upload a working example?kintrupf wrote:It works for me. Put a variable with a list of options in the List Values parameter and the already selected ones in the Default Value parameter.giovag7 wrote:If i use this variable "value" in the field "default value" of input dialog, i expect that every time i open that input dialog i see last selected choice, but is not so.
How I can make this working?
Make sure both variables contain a comma separated list of options, the second variable should of course contain some strings from the first to select.
And put both variables in curly braces like {var1}.
Re: Input dialog default value
giovag7 wrote:Sorry, but i can't understand how to use variable containing list {list,listformat,comma}. In my flow i simply used a text list "Option1, Option2". Could you upload a working example?
No problem, please take a look at the attached flow. It defines a list of 5 options of which 2 are selected when the Input Dialog opens.
The Script action is used to fill the two list variables "available" and "selected" which are then used to populate the Input Dialog.
Re: Input dialog default value
http://automagic4android.com/flow.php?i ... ba37b8afb5
Ok thank you. Now i found the way to obtain what I mean. I made some mod to your flow. Now it "remember" the last choice.
Ok thank you. Now i found the way to obtain what I mean. I made some mod to your flow. Now it "remember" the last choice.
-
- Posts: 186
- Joined: 12 Feb 2014 01:45
Re: Input dialog default value
Interesting, thank you both for sharing. Giovag7 I don't think you need the scripting part selected = newlist() to make your flow work the way you want. See this revised flow. Less is more
.
http://automagic4android.com/flow.php?i ... a94b7f9df2

http://automagic4android.com/flow.php?i ... a94b7f9df2
Best regards,
AngelAtwOrk
AngelAtwOrk