Adding Logic

The Digia Dashboard allows you to enrich your app’s behavior by adding custom expressions and logic directly from the UI. This can be done in any field that supports dynamic values β€” simply click on the dynamic field icon [<>] and the Code Dialog will open.

Within this dialog, you can:

βœ… Use built-in expression functions βœ… Nest expressions βœ… Combine expressions with your own JavaScript functions βœ… Generate expressions using AI

Preview Value is used for the Design mode and has no impact on the actual expression.


πŸ€– AI-Powered Expression Generation

Digia now supports AI-assisted expression writing. Simply write a prompt describing what the expression should do, hit generate, and the AI will create the expression for you. The generated expression is fully editable, allowing you to refine it as needed.

AI expression generation dialog

This feature makes it easier for anyone to create complex expressions without deep knowledge of the syntax.


🧠 Built-In Functions

Digia provides many built-in functions out of the box. These are grouped into the following categories:

Category
Description

Work with JSON objects and extract values

Perform numeric calculations

Parse, convert, and format dates

Manipulate string values

Add comparisons and logical operations

These functions can be mixed and matched in expressions and can also be nested within each other.


πŸ“Œ Examples

Expression
Description

jsonGet(response.data, 'users[0].id')

Returns the id of the first user in the list

isNotEqual(2, 2)

Returns false because both arguments are equal

isoFormat('2024-06-03T23:42:36Z', 'Do MMMM')

Converts ISO string into a readable format (3rd June)


πŸ” Nested Expressions

Expressions can reference other expressions:

In this example, the platform first resolves jsonGet(...), and then evaluates the result against the number 5.


If the built-in expression language isn’t enough, you can write your own JavaScript function and call it from the code dialog.

Example:


βœ… Summary

Feature
Available

Built-in expression functions

βœ…

Nested expressions

βœ…

Custom JavaScript invocation

βœ…

Combination of both

βœ…

AI-powered expression generation

βœ…

Last updated