Glide HomepageOpen Glide

Getting Started

Quickstart
Intro to Layout
Intro to the Data Editor
Data to Layout
Intro to Actions
Intro to Workflows
App Settings
Templates

Essentials

Data Sources
Basic Columns
Components
Security and User Data
Users
Publishing and Sharing

Automation

Actions
AI
Computed Columns
Construct URL
Date Difference
Distance
Experimental Code Column
Format Duration
Generate Image
If → Then → Else Column
Joined List
Lookup Column
Make Array Column
Math Column
Query Column
Relations
Conditional relations
Rollup Column
Row ID Column
Single Value Column
Split Text Column
Template Column
Integrations
Workflows
View API Docs

Use Cases

Forms
Images in Glide
Conditions, Filtering, and Visibility
Duplicating Apps

Reference

Account
User Experience
Values
  • Computed Columns
  • Relations
  • Conditional relations

Conditional Relations

Create relationships only in certain conditions.

When you configure components, computed columns, or conditions, you're always dealing with values. The If → Then → Else Column allows you to produce new values based on a set of conditions.

The If -> Then -> Else column configuration.

The simplest and most common way to use this column is to test for a value and then output a Custom Value. For example: "if the value in the Price column is below 10 then output the value low."

However, each case's output value can also be a Column Value. There are many reasons and use cases for this, but let's look at two of the most common.

Outputting a value for a relation

For example, this app has an If → Then → Else Column which tests for the custom value of true and then outputs a column value from the row that is being evaluated.

In other words, if an item is active then the Property ID will be shown. You can then use that value elsewhere, like in a further Relation. Your new relation will only pull back those rows that have values in them.

Outputting a value for a calculation

Another example would be in a calculation. Say you had an inventory log, with sales items out and restocking items in, and we wanted to sum the total of all the sold items in the log (but not the restocking items).

To do this, you can create an If → Then → Else column that will show the order total only if the Sale or Restock column contains the value 'Sale' and will show the value of 0 if not. You can then use that column elsewhere in a calculation, rollup, or chart.

Have a question about Conditional Relations? Ask the Glide community.
Need more help? Hire an Expert.

Updated more than a week ago

Previous

Relations

Next

Rollup Column

Was this article helpful?
Exit Preview Mode