Expression Editor

Expression editor is a visual interface for building expressions using operators, variables, functions, and properties. Expressions can be used to map fields, create conditions, generate file names, and more. This chapter tells you how to use Expression Editor and explains its role in Skyvia.

Getting Familiar With the UI

By the end of this paragraph you will get familiar with the UI elements of the Expression Editor and learn how to use them.

Expression Area

Expression Area

Expression Area is taking the major part of Expression Editor’s UI. Use it to create and edit your expressions. You can use the sidebar or the operators menu to add elements to the Expression Area.

Operators Menu

Operators Menu

You can find Operators Menu at the bottom. It provides the list of operators that you can use to create expressions. Click on the operator to add it to the Expression Area.

Sidebar

You can find sidebar on the right. It gives you a quick access to the properties, variables, and functions. Combine them with the operators to create complex expressions. Click on the prefered item on the sidebar to add it to the expression area. The arrow next to the item means that there are nested items in it. To quickly find a needed item use search .

Preview

Preview

Preview pane allows you to check the expression results by manually setting values to properties and variables.

Validation

Validation

Use Validate button to check if your expression is valid. If it is not, you can check the reason by clicking Details. Moreover, Expression Editor automatically underlines the invalid elements of the expression in the Expression Area.

Expression Editor provides code completion. To use code completion, start typing your expression and Skyvia will offer you the autocomplete options.

Expression Syntax

The syntax used to create expressions is described in details in the Expression Syntax chapter of the documentation. Read it to learn about identifiers, data types, literals, opertators, and functions.

Expression Editor Usage

Expression editor is widely used throughout Skyvia products. You can open it whenever you see icon. To find examples of the most common use cases, check examples below.

Mapping Fields to Expressions

Mapping Fields to Expressions

You can map fields to expressions on the Mapping Definition page by choosing Expression from the dropdown. As an example, you can map FullName field to the following expression: FirstName + ' ' + LastName

Setting Conditions

Setting Conditions

In Data Flow, Control Flow, and Automation, components use conditions to navigate the execution logic. Conditions are expressions that are being evaluated to a boolean value. Example of such expression would be City == 'London'.

Generating Files Names

Generating Files Names

While loading data to JSON or CSV targets, you can choose to generate a name of the file based on a condition instead of typing it in manually. For example you can use the following expression to add a timestamp to the file name: 'CompanyReport ' + ' ' + string(get_date())