Autocomplete for Variables and Conditions

What is autocomplete?

Autocomplete is a convenient way to predict the rest of a query a user is typing and suggest options for inserting the correct query.

 

Where can I use autocomplete?

 Autocomplete can be used for referencing variables and writing up conditions.

Variables

Autocomplete for variables are supported throughout the Studio including Paragraphs and questions in the FORM block and rich text editors. However, autocomplete of variables in rich style document templates is not supported. Instead, you can use the Checkbox Word Add-in to connect your App and insert the variable you wish to reference in your document.

 

Conditions

Supported areas for autocomplete of conditions include:

  • FORM field conditions
  • Routes
  • FILTER block condition field
  • LOOP block break condition field

Areas NOT supported for the autocomplete of conditions include:

  • MERGE block output set condition fields
  • LOOP block output set condition fields

Note: Users can still write out their condition expressions manually and won't have to always rely on autocomplete. Users are still prone to creating errors even with autocomplete, especially if they are writing variable to variable condition expressions.

 

Autocomplete Condition Pathways for each Variable Type 

Variable Type Operator Options Value Options
TXT, PARA, LOOP
  • == (Equals To)
  • != (Does NOT Equal To)
  • Insert Text - 
    Will insert double quotation marks "" with the cursor starting after the first quotation mark to let the user continue typing the value manually
NUM, SLIDR
  • == (Equals To)
  • != (Does NOT Equal To)
  • > (Greater Than)
  • < (Less Than)
  • >= (Greater Than or Equal To)
  • <= (Less Than or Equal To)
No options shown - User will be required to enter a value manually
RAD, SEL (dropdown)
  • == (Equals To)
  • != (Does NOT Equal To)
The options added to the radio buttons or dropdown in the condition expression will be shown as values to insert
CBX
  • == (Equals To)
  • != (Does NOT Equal To)
  • Checked - will insert "TRUE"
  • Unchecked - will insert "FALSE"
ACT (YN Block)
  • == (Equals To)
  • != (Does NOT Equal To)
  • Yes - will insert "YES"
  • No - will insert "NO"
  1.  

Note: Autocomplete for conditions allows users who are unfamiliar with the condition syntax to write conditions more easily and also help users create condition expressions faster. However, users are still prone to creating errors, especially if they are writing variable to variable condition expressions.

 

How to trigger autocomplete for variables

  1. In a supported area of the autocomplete of variables, type "{{" and continue typing a variable name  to filter down the query suggestion options

    Checkbox_2021-02-11_19-40-59.png


  2. Select a suggested variable to insert the variable that will be automatically wrapped in double curly brackets

    Note: You can also press "tab" on your keyboard instead of clicking to select a variable suggestion option.

    Checkbox_2021-02-11_19-41-42.png

 

How to trigger autocomplete for conditions

Note: Autocomplete for conditions allows users who are unfamiliar with the condition syntax to write conditions more easily and also help users create condition expressions faster. However, users are still prone to creating errors, especially if they are writing variable to variable condition expressions.
  1. Click onto a supported area of the autocomplete of conditions and view query suggestions

    Notes:
  • Not all variables will be shown. To filter down on suggested variables, follow step 2 below.
  • The autocomplete will still be triggered even if the condition begins with brackets

    Checkbox_2021-02-11_19-29-52.png

  1. Start typing a variable name after to filter down the query suggestion options

    Checkbox_2021-02-11_19-30-41.png


  2. Select a suggested variable to insert

    Note: You can also press "tab" on your keyboard instead of clicking to select a variable suggestion option.

    Checkbox_2021-02-11_19-31-23.png


  3. Enter a space to trigger the autocomplete to show operator suggestions

    Note: The operator suggestions shown will match the variable type of the variable inserted/typed before hand. E.g. For Number variables, it will show Greater Than, Greater Than or Equal To, Less Than etc. See screenshot below. This behaviour will not be affected even if the variable name is customised.

    Checkbox_2021-02-11_19-31-57.png


  4. Select a suggested operator to insert

    Note: You can also press "tab" on your keyboard instead of clicking to select a variable suggestion option.

    Checkbox_2021-02-11_19-32-40.png


  5. Enter a space to trigger the autocomplete to show the value suggestions. See the list of value suggestions available for each variable type above

  6. Select a suggested value to insert

    Checkbox_2021-02-11_19-33-35.png


  7. [Optional] Enter a space to trigger the autocomplete to show the "AND" and "OR" suggestions to create complex conditions

    Checkbox_2021-02-11_19-38-09.png


  8. Repeat steps 1-8 to continue writing complex conditions