Variables/ Triggers

To build your app with unlimited expressiveness, you may define variables or trigger remote actions.

If you are not familiar with the main data structure of the Internet — JSON — please do a quick read, as it will help you become very poductive: W3 Schools JSON

You do not need to know Javascript, which is the main compute language of the Internet; if you are curious why the code written by AI works, you get quick intro here: Mozilla Javascript Guide

There are four types of variables:

  • String (e.g. "cat", "dog" etc.)
  • Number (e.g. 0.12, 1, 3.1415 ..)
  • Array (eg vectors/lists [1, 2, 3] or n-dimensional structures [ [1,1], [2,1], [2,2] ])
  • Object (this could be a complex JSON structure used for input or output, or whatever is not one of the others)
  • API (this is a trigger: call to some remote resource to push or pull data; you can always access all its data upon execution, or map just the few items of interest)

Once you added a variable, you can debug it, clone it, move it somewhere else in your app, make it conditional, or turn off (e.g. useful during building), or simply remove it if unnecessary.

You will add these in the BEFORE or AFTER section of a step in your app. You can name variables however you wish; however, they should be continuous - e.g. my_variable instead of my variable.

Once created, variables get a V. in front of them, and you can access them as ${V.my_var}

Variables/triggers differ from controls because controls don't have V. in front:

${email} to get the contents of a control such as text input or email

${V.my_variable} to get the contents of a variable

For example, to add two numerical variables a and b , you can define the variable sum:


You can choose the default value if there is some error, or if you wish to use a number separator. You will see more detailed contextual help how to use by clicking on "Supported expressions".

Variables are calculated in the order in which they appear - be mindful and adjust accordingly.


Most variables are simple; however, some may be conditional based on some checks:

Number variables have default values that are set if anything else fails — set these if you need to check the result of an assignment or operation.

Array variables can collect/edit items or be cleared:


You would access array items with ${array_name}{[item]} , where item index starts at 0. You could get the number of items in an array like so: ${array_name}@{count} .

When using array variables (getting data):

${V.VARIABLE_NAME} - to get the full array.

${V.VARIABLE_NAME}{ DATA_PATH } - to get partial data.


Sometimes, when working with external sources, you may not wish to trigger certain activities during the design phase - e.g. once you verified that sending an email works, you may prefer to switch off the trigger until you are ready to deploy your app.


Working with read-only CSV/Excel files

Read-only files are very powerful to drive custom interactions according to your specifications.

For example, you could generate custom offers based on complex logic that includes multiple formulas.


Let's say we uploaded the file French file to Sources, then added it to our application. Let's say it has the following structure (all files loaded to Qreli to be used as reference need to have a header column):

To get a count of the number of rows, you can use a decorator — see the section at the end of this page:${F.French}@{count}

To get an array of a specific column "French", which you can use to generate drop-downs, you can call:

${F.French}{French} —> this returns an array of the French column

Please note that we use 0-based indexes, and that the header row does NOT count.

To get the contents of a specific cell, you would reference the column first, followed by the row.

As such, if we wish to get some specific element:

${F.French}{French, 0} or ${F.French}{1, 0} —> comme (1st element post header)

To get the 4th element in the column English:

${F.French}{English, 4} or ${F.French}{2, 4} —> he (4th element post header)


To assign true/false to a variable whether a column, row, or cell contains a specific element (these all return TRUE):

Of course, instead of je you could use a variable such as ${V.term}.


If you would like to find the row or column of a particular item, you can use the find decorator, like so:

${F.French}@{find: column=English; value=for} —> returns 6 (6th row excluding header, 0-index)

${F.French}@{find: column=2; value=for} —> returns 6 (6th row excluding header, 0-index)

${F.French}@{find: row=0; value=as} —> returns 2 (column 3, 0-index)


Please note that the value is to be searched without quotes: for instead of 'for' or "for".


In conditions, you would write the rules like so:

  • to check whether a column contains a specific scalar or variable:

  • similarly, to check whether a cell contains a specific value (the below return true):

Calling APIs and mapping responses

One of the superpowers of Qreli is the direct access to APIs, and the simplicity of working with them.

Once added to your Source, just define a variable with the type API, and start typing its handle/name or search for a function you wish to use.

For example, to get the list of available newspapers in the Library of Congress Chronicling America collection:


After selecting the function of interest, a popup appears where you can enter whatever parameters may be of interest - none in this case. You would click on the Try button to explore the results:

Once you receive the response, you can map individual items or arrays of data:

Once completed, you can see the mapped data:

and you can use it as needed, e.g. to create a dropdown:

You can also pull up individual elements directly within the array returned, like so:

${V.get_newspapers}{newspapers[10].title} or

${V.get_newspapers}{newspapers[10]['title']}

This will pull up the "title" property of the 10th record returned. Of course, instead of 10 you could have a random number/variable, like so: ${V.get_newspapers}{newspapers[${V.random_nr}].title}


Accessing array elements directly works even without mapping. For example if you have a variable that returns a messages object, you can call it as such:

${V.my_object}{messages[your_index]}


This is an example where we map individual data elements:

And present the results:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.