This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Prompt_With_List [2018/05/03 09:57] peternlewis [Prompt With List] |
action:Prompt_With_List [2019/07/01 04:20] peternlewis |
||
---|---|---|---|
Line 3: | Line 3: | ||
The //Prompt With List// action (v8+) lets you select from a list of values. The values should be placed on separate lines, and can come from a clipboard, variable, file or text within the action. | The //Prompt With List// action (v8+) lets you select from a list of values. The values should be placed on separate lines, and can come from a clipboard, variable, file or text within the action. | ||
- | You can include a title (which is only displayed when the search field is empty), as well as a default search string (v8.1+). You can also configure the width of the window (narrow, normal, wide, automatic) and whether to allow multiple selections (v8.1+). | + | {{ promptwithlist.png?nolink&575x264 | Prompt With List }} |
+ | |||
+ | You can include a title (which is only displayed when the search field is empty), as well as a default search string (v8.1+). You can also configure the width of the window (narrow, normal, wide, automatic) and whether to allow multiple selections (v8.1+) and whether to sort the entries (v9.0+). | ||
If a single entry is returned, it is returned by itself (no newline character). If multiple entries are returned, they will be returned as multiple lines, each followed by a newline character (8.1+). | If a single entry is returned, it is returned by itself (no newline character). If multiple entries are returned, they will be returned as multiple lines, each followed by a newline character (8.1+). | ||
Line 14: | Line 16: | ||
The selected item will be saved back to the source of the list, or to a specified clipboard, variable or file. | The selected item will be saved back to the source of the list, or to a specified clipboard, variable or file. | ||
+ | |||
+ | ==== How to Store a Different Value than Displayed ==== | ||
+ | |||
+ | If you want to display a “friendly” value as the default value, but store a different value (like a code), you can do this by using a code followed by two underscores (`__`) and then the value, for example: | ||
+ | |||
+ | ``` | ||
+ | A__Excellent | ||
+ | B__Good | ||
+ | C__OK | ||
+ | F__Fail | ||
+ | ``` | ||
+ | |||
+ | will display a list with Excellent, Good, OK, and Fail, but return a value of A, B, C or F as appropriate. | ||
===== See Also ===== | ===== See Also ===== |