LogoLogo
  • 👋Welcome
  • 🎓Academy
    • Getting Started
    • Connecting Data Sources
      • Jet Database
      • Google Sheet
      • Airtable
      • Custom API Action (Zapier)
      • Firebase
    • Data Editor
      • Data Editor Interface
      • Data Source Settings
      • Prepare & Organize Data
      • Edit Data
      • Field Types
      • Related Data
      • Lookups & Rollups
      • Files & Storages
      • Data Blending Intro
    • App Builder
      • Builder and User Modes
      • Pages and Overlays
      • UI Builder
      • Bind Data to UI
      • Bind Filter to Table
      • Bind Input Field to Table
      • Bind Form to Table
      • Bind Related Tables
      • Bind across Pages
      • Bind from Page to Modal
      • Calculcation & Formulas
    • Team & Users Permissions
    • Automations
    • Environments
    • Custom API Collection
    • Nested Filters
    • Built-in Approval Flow
    • Create Multi-Step Forms
    • Component Designer
    • Build Apps Together
      • Custom CRM
      • Internal Tool
      • Customer portal
      • Supabase CRM
    • Import Figma design to Jet
    • Authentication
      • Supabase Auth
      • Firebase Auth
      • Xano Auth
  • 📣What's new
  • 🔐Data Privacy & Security
  • 🙌Join the Community
  • 🐞FAQ and Troubleshooting
    • A data resource is failing to sync
    • Data is not loading
    • How to clone the whole app?
    • Why new SQL tables are not showing?
    • How to restrict input in a text field?
    • Troubleshooting Django integration
    • How to Connect to Slack Channel
  • Guides
    • ⚡Quickstart
    • 🛠️Building an Internal Tool
      • Connect your Data
      • Configure Data
      • Build UI
      • Run Actions
      • App Customization
      • Publish your App
    • 👥Creating a Customer Portal
      • Prepare your Data
      • Generate the App
      • Set the Layout
      • Link Related Tables
      • Customize your Portal
      • Users & Permissions
    • 🤿 Deep dives
      • Single relations
      • Conditional Visibility
      • Reading data from API
      • Reading data from SQL
      • Generate Invoice or Document
        • Document
    • 📧Send Emails
    • 🎨Pixel Perfect App
      • Designing your component
      • Adding Images
      • Apply Frame to Image
      • Pass values to Image
      • Pass values to Text Field
      • Binding data
      • Hide elements
      • Support multi-screens
    • 🚀UI in seconds
    • 🪅Figma design into a web app
  • AI Custom Components
    • Enhance Your Prompts with AI Assistance
    • Enhancing Your Prompts with Images
    • Auto-Generate Parameters and Actions
    • Edit Your Custom Code with the Custom Component Builder
    • Import and Iterate on Your Existing Components
  • References
    • 🦄Core concept
      • Jet UI
        • App settings
          • Appearance Settings
          • Adding Custom Fonts
          • Theme & Styles
          • Menu
          • App Info
          • Custom Domain and Transactional Emails
          • Sign Up
          • Features
          • Custom Scripts & Styles
      • Intro to Data
      • Navigation
      • Menu Conditional Enabled
      • Set Variable Action in Menu
      • Sharing your app
        • Invite by Email
        • Invite by Link
        • Creating a Public Page
    • 🧰Data Sources
      • Database resources
        • Instant Installation
        • Docker Installation
        • Python app Installation
      • Jet Tables
        • Storage & Files
      • Rest API
        • Basic Authentication
        • Bearer Token
        • OAuth 2.0
        • Jet Requests Auth
      • Firebase / Firestore
        • Syncing Firebase Data Using Functions
        • Firestore
        • Import CSV into Firebase
        • Firebase Cloud Storage
        • Realtime DB
        • Visualize Subcollection
      • Google Sheets
        • Working with Data
      • Airtable
      • MongoDB
      • Amazon Athena (AWS Athena)
      • Databricks
      • CockroachDB
      • ClickHouse
      • GraphQL
      • Supabase
      • Django
      • MySQL
      • MariaDB
      • Xano
        • Create APIs on top of your Xano database
        • Connect Xano to Jet Admin
        • Upload files to Xano
      • SmartSuite
      • Stripe
      • Hubspot
      • Intercom
      • Zendesk
      • Salesforce
      • Slack
      • Zapier
      • Webflow
      • Amazon S3 and S3 compatible storage
      • Google Cloud Storage
      • SendGrid
      • Twilio
      • Mixpanel
      • Snowflake
      • OpenAI and Jet Admin
      • Supabase Storage
    • 🔗Binding & Values
      • Binding Components
      • Extract & Pass Values
      • Binding two related Tables
      • Binding Form to Table
      • Binding Filter to Table
      • Binding Field to Table
      • Binding across Pages
      • Binding across Overlays
    • 🔠Variables
    • 🌈Basic Columns
    • 🔢Computed Column
      • Relations
      • Rollup Column
      • Lookup Column
      • Formula
        • Setting up promotional email
        • Create Custom fields using Formulas
        • Parse JSON Fields
        • Math Column
        • List of Functions
      • JavaScript Column
      • Calculated values in column
    • 🎨Design & Structure
      • Customizing Pages
        • Create a New Page
        • Copy the Page
        • Customize the Page
        • Page Values
        • Link Pages
        • Load Data (Page Query)
        • Page Opens Action
        • Home Page
      • Components
        • Lists
          • Table
            • Grouping records
            • Filters (built-in)
            • Table Actions
          • Map
          • Kanban
          • Calendar
          • Gallery
          • Carousel
          • Timeline
        • Filters
        • Form
          • Create a Form
          • Customize a Form View
          • Examples
          • Page
          • Select
          • Multiple Select
        • Fields
          • File
          • Multiselect / Chips
          • Checkbox
          • Date & Time
          • Date Range
          • Image
          • Text
          • Password
          • Number
          • Rating
          • Slider
          • Range Slider
          • Steps
          • URL
        • Charts
          • How to Set Up a Chart
            • Chart Appearance
            • Drill Down
          • Line
          • Bar
          • Pie
          • Doughnut
          • Single value
        • Text
        • Buttons
        • Button Group
        • Custom Notifications
        • Component Actions
        • Detail
        • Layouts
          • Containers
          • Accordion
          • Collapse
          • Columns
          • Overlays
            • Customizing Overlay
            • Overlay Parameters
            • Building dynamic workflows
          • Slideout
          • Tabs
          • Vertical Tabs
        • HTML Component
        • JavaScript component
          • Create a JavaScript Component
          • Set JavaScript Component Inputs
          • Use JavaScript Component Outputs
        • File PDF Viewer
        • QR Code
        • Bar Code
        • Scanner
        • Signature
        • IFrame
        • Alert
        • Accordion
        • Chips
      • Field Values
        • Extract values from components on the Page
      • Nested Filters
      • Advanced Filters
      • Sort
      • Group
      • Actions
      • Dropdown Popups
      • Export
      • App Theming
      • Global CSS & JS
      • Analytics or Live chats
    • 🧮Data Editor
      • Syncing Schema and Data
      • Managing Columns
      • Making API requests
        • Endpoint Response Outputs
        • Response Transformer
        • Sorting data
        • Pagination
          • Page-based pagination
          • Offset pagination
          • Cursor based pagination
      • Making SQL queries
      • Text to SQL
      • Storages
      • File Storage and Uploading
        • Jet Admin Storage
        • Data Source Storage
      • Cache Frequency
      • Many-to-many relationship
    • 🧞‍♂️Visibility rules
    • ℹ️Conditionals
      • Conditional Visibility
        • Examples
          • Hiding a component until a row is selected
          • Hiding a component until a row with a certain value is selected
          • Hiding a component using the Page Value, User, or Team Property value
          • Hiding a component using multiple conditions
      • Conditional Disable
      • Conditional read, add, edit & delete
    • 🔐Users & Permissions
      • Sign In/Sign Up
        • Auth0 SSO OAuth 2.0
        • Auth0 SSO SAML2
        • Azure AD SSO OAuth 2.0
        • Okta SSO
        • Google SSO OAuth 2.0
        • Google SSO SAML2
        • Custom SSO OAuth 2.0
        • API calls with SSO token
      • Roles in Permissions
      • User-specific Permissions
    • ▶️Preview & Publish
      • Embed Apps
        • Embedding App using a generated link
        • Embedding App using iFrame/HTML
    • ⚙️ Automations & Workflow
      • Triggers
      • Steps
        • Actions
        • Rules
      • Inputs, Outputs, Parameters
      • Test & Debug
      • Approval Workflow
      • Success/Error Actions
      • Iterators
      • Zapier Workflows
    • 👨‍💻Javascript
    • 💠360 Data/Data Blending
      • Sync Connection
      • Blending the Data
      • Sync Options
    • 🔤Localization
      • Account Settings
      • Adding Language to Jet Admin
      • End-user Localization
    • 🎚️Version Control
      • Cross-Instance Backup Restoration
    • 📖Logs
    • 🪂Other Features
      • Environments
        • Merge Environments: Jet Tables and Custom Components
      • Audit logs
      • Manage your subscription
      • Custom domain
      • Update to a new version
    • 🛫Jet Admin API
      • Interacting with Jet Admin API
        • Get API Token
      • Users API
      • Teams API
      • Projects API
      • Pages API
      • HTTP requests API
    • 🔐Authentication systems
      • Jet Auth
      • Firebase Auth
      • Auth0
      • Supabase Auth
      • Token-based Auth
      • Xano Auth
    • 🎇Integrations
  • 🖍️Component Designer
    • How to use pixel-perfect components
    • How to work with component designer
    • Right sidebar
      • Layout
      • Auto Layout
      • Conditional Visibility
      • Component Responsiveness / Constraints
      • Fills
      • Borders
      • Shadows
      • Interactions
    • Frames and Groups
    • Action components
    • Component and layer states
  • 🖼️Import Figma Design
    • Install Plugin
  • DEPLOYMENT
    • ⛅Cloud
    • 🏎️Self-hosted
      • SSO on self-deployed Jet Bridge
      • Using self-deployed HTTP proxy
      • Common Problems
      • Configuration
    • 🖥️On-premise
      • Deploy On-Premise Jet Admin with Docker
      • Update
      • .env configuration (local host)
        • Custom Domain Configuration on-premise
        • Email Sending Configuration
        • Nginx Configuration
      • Service Health Check
      • Common Problems
      • Superuser access
    • ⛺️ Database Heroku deployment
Powered by GitBook
On this page
  • Basic Math Operations
  • Functions in Formulas
  • Setting up promotional email
  • Create Custom fields using Formulas
  • Formulas variables
  • Tabs context
  • User-specific properties

Was this helpful?

Export as PDF
  1. References
  2. Computed Column

Formula

Formulas may involve functions, numeric operations, logical operations, and text operations that operate on fields

PreviousLookup ColumnNextSetting up promotional email

Last updated 11 months ago

Was this helpful?

A formula is a method to access every piece of data and build up to as complicated a data flow pattern as you need it to be. You can combine, modify, or calculate the values, or you can even pull up an access control system based on logical conditions set by an appropriate formula.

Let's build a basic example.

  1. Click on the Add Column

  2. Choose to Add a Computed Column

  3. Rename the Label

  4. Click on the Set up with Formula icon

  5. Go to the formula's tab

  6. Choose Concat -> First name and Last Name

  7. Add a separator to the Expression

Basic Math Operations

In a formula, you can reference columns by name and use these to do mathematical calculations. For example, if you wanted a formula that calculated the total based on the price and quantity, the formula would look like:

= Price * Quantity

Functions in Formulas

Jet Admin also has several useful functions that you can use in your formulas.

A key thing to remember when using functions is that a message will appear that shows you exactly how to use each function when you click on it. This way, you never have to remember or think about how to use a given formula, you can simply read how to use it and enter or choose the values you need from the menu.

There are four different groups of built-in functions:

  • General Functions – e.g. CONCAT(), IS_NULL(), LOWER()

  • Logical Functions – e.g. IF(), EQ(), AND()

  • Mathematical Functions – e.g. ROUND(), ABS(), SUM()

  • Date & Time Functions – e.g. NOW(), MONTH(), IS_DATE_AFTER()

Simple Example: You have a table where First Name and Last Name are separate fields, but you would like to concatenate them to display them in one field.

  1. Select your table, and then click on Add Computed Column in the component menu.

  2. Click on the ƒx Formula button next to the value field.

  3. Select or search for the CONCAT() function in the menu that appears.

  4. Enter the values that you want to concatenate. Like the message shows when you select CONCAT(), the appropriate syntax is CONCAT(VALUE1, VALUE2). VALUE1 and VALUE2 can be fields in your table, or they can be something else (e.g. a string in quotes: "string" – this might be useful for adding a space between table values). For this example, the final result will look like this:

=CONCAT(first_name, " ", last_name)

Let's see how you can make use of Jet Admin formulas.

Setting up promotional email

For an introductory example, we will consider feeding customers' email addresses to promotional emails. Once the user is selected in the Customers table, his or her email should appear in the Email field to send a promotional Email with a Marketing tool. We will use Functions as well to create a Promotional Email template.

Create Custom fields using Formulas

In this use case, we will create a custom column in the Customer table and calculate a score depending on some logical condition.

Formulas variables

Essentially, this is a tabbed pop-up window that reflects all the components on the current page, a list of functions, and a set of filters to manage data in the selected table.

The number and type of tabs depend on the context. This allows the user to have access to only those tools that apply to the objects he or she is working with. For example, if we work with table parameters, there will be a tab with filters. In case we drill down to a specific record of a table and have these record fields displayed on a page, a tab with Record components will be available:

Tabs context

Search tab

In this tab, you see a general list of all available interactions with the current component or other components and parameters.

Current component tab

When you are working on a Current Component setting, the context in the formulas will show you the Current Component setting at the very top. In this tab, you can only access the fields in the current component:

Components tab

Here you can access any data from your resources through any component (fields, tables, charts, etc.) on the current page.

User-specific properties

You can create custom columns in a table to handle cases such as math operations on your data, parsing JSON fields, or creating conditions. Let's look at a few examples of how to use it:

App and Environment properties

Use the App name and Environment name properties in your Application to filter your data.

Device properties

Device screen size tokens in Jet Admin enable you to reference and utilize specific properties related to the screen size of various devices. These tokens ensure that your applications are responsive and optimized for different screen sizes, enhancing the overall user experience.

You can utilize these tokens to create rules or conditions that adapt the interface based on the device type and screen size. For instance, you might want to show a different layout for desktop users compared to mobile users

When you configure the table parameters, the features displayed in the Formulas window will fit the component context, e.g. there will be a new tab with Filters to set up filtering for selected table or a tab with if any exists. Let's walk through the possible context Tabs.

If you want to restrict access for a User or a Team to data that is relevant for their work within a JetAdmin app, you can quickly access the in these tabs and assign the user or team ID to the data columns which should be visible for them:

🔢
Setting up promotional email
Create Custom fields using Formulas
User properties
User & Team properties