Skip to content

Prompt expression – asking the user for a value

The prompt expression shows the user a dialog and returns what they enter or select. It is used in actions that need information at the moment they run – a reason for closing a ticket, a date for a follow-up, the choice of a record.


1. At a glance

Purpose Asks the user for a value in a dialog
Typical use Usually the value of an action command that sets a variable; later commands read the variable
Returns The entered or selected value
Related Variable, Actions

2. Settings

Setting Meaning Default
"Input Type" The input control: "Text", "Multiline Text", "Number", "Date", "Date & Time", "Time" or "Logical" (a switch). "None" is not valid – the prompt then returns an empty value without asking. "None"
"Default Value" The value the input is pre-filled with (not used for selection lists) empty
"Title" The title of the dialog "Prompt"
"Message" The text above the input – the question the user is asked empty
"Validation" Whether the answer is restricted to a list: "No Validation", "From Field", "From Query" (or "From Markup", see section 5) "No Validation"
"Continue on Cancel" When on, cancelling returns an empty value and the action continues. When off, cancelling stops the action. off

With "From Field"

Setting Meaning
"Lookup Field" A field of the expression's entity that has a validation rule with valid values. Only such fields are offered.

The user picks one of the valid values that apply to the current record. The prompt returns the id of the chosen valid value.

With "From Query"

Setting Meaning
"Lookup Entity" The entity whose records are offered
"Lookup Field" The field shown as the text of each choice
Query Optional conditions that restrict the offered records. Without conditions, all records of the entity are offered. The right sides of the conditions are evaluated for the current record.
"Lookup Return Field" The field whose value is returned for the chosen record, for example its id. Empty returns the value of "Lookup Field".
"Enforce Lookup Value" No effect of its own (section 5)

3. Behaviour

  • The dialog is shown when the expression is evaluated; the evaluation waits until the user answers.
  • "Time" returns the time in the form HH:mm:ss.
  • With a selection list, the user can only pick from the list.
  • If the list cannot be built – no current record for "From Field", no applicable validation rule, a lookup entity that does not exist – the dialog silently falls back to free input of the "Input Type".
  • Cancel stops the action that is running, unless "Continue on Cancel" is on. The value is then empty.

Where a prompt works

A prompt needs a user who can answer. It works in actions started from the user interface – a button, a menu entry. In a scheduled action, a mailbox listener or any other background processing there is nobody to answer; do not use prompts there.


4. Examples

Reason for closing: An action "Close ticket" sets the variable "Reason" to a prompt with Input Type "Multiline Text", Title "Close ticket", Message "Why is the ticket being closed?". A later command writes the variable into the field "Resolution".

Choosing a technician: Input Type "Text", Validation "From Query", Lookup Entity "Employee", Lookup Field "Name", query "Department" Equals Field service, Lookup Return Field "Id". The prompt returns the id of the chosen employee, which a later command writes into the link field "Technician".


5. Limitations

  • "Enforce Lookup Value" has no effect at runtime: a selection list never allows free text anyway.
  • "From Markup" is not implemented and behaves like "No Validation". The settings shown for it have no effect.
  • "From Query" reads at most 99,999 records for the list.