# Advanced Prompt Statement Functionality

The following statements advanced settings:

> Ask
> Prompt
> Prompt from Container
> Prompt for Fields
> Prompt for File or Folder
> Prompt for Text

Additional configuration is performed by clicking on the statement's button with the gear icon or by manually setting named variables. Prior to Yate v6.6, these items had to be configured by setting named variables manually. All items in the configuration panel have to be enabled. When not enabled, no change is made to the underlying named variable which contains the item's value at runtime. All text fields on the configuration panel may contain any of the escape sequences described in Escape Sequences.

The following items are common for each of the above statements. Note that the item's name is the name of the corresponding named variable which will be set automatically

Prompt Title
  You can display a title on any of the above statements displayed panels. Note that not all OS versions display a title on panels when prompting for files or folders. On most supported OS versions the Prompt for File or Folder statement can only display a title when the New File option is specified. On most generated panels when a title is empty the horizontal line under the title area is hidden. If you want the horizontal line to be displayed set the title to a space.
Prompt Checkbox Text
  All of the above statements have the ability to display a checkbox control which stores a result regardless as to what button is used to dismiss the window. The display of the checkbox control is enabled by specifying a non empty value for this setting. This is the text displayed with the checkbox. An empty value disables the display of the checkbox.
Prompt Checkbox Mixed
  When set to No (0 in the named variable) a standard on/off checkbox will be displayed. When set to Yes (1 in the named variable), the checkbox control will be a tri-state having an On (checked), Off (unchecked) and Mixed (-) state. When set to Hide (-1 in the named variable), the checkbox icon is not displayed. Essentially this turns the checkbox control into a text label outside of the bounds of the scrolling text. The Prompt for File or Folder statement treats Hide as equivalent to Yes.
Prompt Checkbox Value
  You can select On (1 on the named variable), Off (0 in the named variable) or Mixed (-1 in the named variable) for the initial value of the checkbox. When mixed is selected and the checkbox is not mixed, it is equivalent to On. Note that the checkbox's possibly modified value is returned in the same named variable. In each statement's configuration panel you can set this named variable to No (0) or Yes (1). If you want a to set the value at runtime, disable the control in the configuration panel and directly set the named variable.
Prompt Checkbox Exits
  This named variable is only accessed for the Prompt from Container statement. When the named variable contains a non zero integer value, the displayed panel will exit immediately whenever the state of the checkbox is changed. No validation is performed. The Prompt Chosen Button will be set to -1.

Note that in order to reduce the dependency on named variables, newly created versions of the above statements will enable all settings to their default values.

Additional items can be configured which are specific to individual statements.

# Prompt for Fields

Prompt for Fields Constraints
  You can choose to require at least one field to be selected. (E in the named variable).

# Prompt for File or Folder

Prompt for Path Button
  You can override the text displayed in the OK button.
Prompt for Path Folder
  You can supply an initial folder for the panel.
Prompt for Path Filename
  You can supply an initial filename to be displayed when asking the user to choose a New filel.

# Prompt for Text

By enabling Prompt for Text Formatting you can accumulate the various formatting codes written to a named variable of the same name. The formatting codes are documented in the Prompt Text Format Codes topic.

Configuring Buttons on Prompt Statements