Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

Dialog choice

A decision block that lets the user select from a list of choices.

The fiber will pause until the user has made a choice, cancelled the dialog or the timeout expired.

If an array is set as choice titles then each of its element is used as the title of a choice, optionally the choice descriptions should be an array of equals size where each element the description (second line) of the choice at the same index. If a dictionary is set then its values are each used as the title of a choice, optionally the choice descriptions should be an dictionary where each value is the description of the choice with the same key. A number or text is used as the title for a single choice, optionally the choice descriptions will be the description of that choice. If null, then no choices will be shown.

The sift function can be used to filter the selected choices.

Note! The selected indices/keys output variable is assigned an array even when only a single choice is possible. To get the first or single choice index/key use the subscript operator, e.g. selected[0] or choices[selected[0]].

Input arguments

  • Title — dialog title, default is no title.
  • Choice titles — title of each choice, default is no choices.
  • Choice descriptions — description (second line) of each choice, default is no descriptions.
  • Pre-select — an array with indices/keys of choices that should be pre-selected, default is none.
  • Multi-select — whether to allow selection of multiple choices, default is false.
  • No selection — whether to allow no selection, only applicable for multiple choice.
  • Sort — whether the displayed choices should be sorted in alphabetical order, default is true.
  • Timeout — time until the notification/dialog is automatically canceled, may be inaccurate as it’s affected power save features such as “doze”, default is no timeout.
  • Notification channelUUID of notification channel used for shown notification, default is the flow default or Flow.
  • Show window — whether to show the dialog window directly without having to tap the notification. Requires the “appear atop of other apps or parts of the screen” privilege on Android 10+.

Output variables

  • Selected indices/keys — variable to assign an array with the selected indices/keys.
Note! This documentation is also accessible within the app from Help & feedback menu.