# Relation with Condition

**URL:** https://community.glideapps.com/t/relation-with-condition/25735
**Category:** Ask for Help
**Created:** [April 19, 2021, 3:07am UTC](https://community.glideapps.com/t/relation-with-condition/25735 "2021-04-19T03:07:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [April 19, 2021, 3:07am UTC](https://community.glideapps.com/t/relation-with-condition/25735/1 "2021-04-19T03:07:18Z")

</div>

Hi,

How can i make a multiple relation but with condition?  
For example: I have a list of “Inspection report”  
Model | Inspection Type | Date  
Model 1 | Daily | 1/2/2021  
Model 1 | Quarter 1 | 2/4/2021  
.  
.  
Model 2 | Quarter 1 | 1/3/2021  
.  
.  
etc

Another list that i have is “Service Due”  
Model | Latest Date | Latest Inspection Type  
Model 1  
Model 2  
Model 3

I want the “Latest date” and the “Latest Inspection Type” is from the list but **except if the inspection type "Daily"**

Do you guys have any idea how?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2021, 3:27am UTC](https://community.glideapps.com/t/relation-with-condition/25735/2 "2021-04-19T03:27:36Z")

</div>

In your first table, create an if-then-else column:

- If Inspection Type is Daily, then blank (empty)
- Else Inspection Type

Now use that column to create the multi-relation to your second table.

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [April 19, 2021, 3:29am UTC](https://community.glideapps.com/t/relation-with-condition/25735/3 "2021-04-19T03:29:16Z")

</div>

Ops sorry but i want to them relation on model no.  
Because second table appear only by model

Model 1 - Latest date - latest inspection type  
Model 2  
Model 3

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2021, 3:31am UTC](https://community.glideapps.com/t/relation-with-condition/25735/4 "2021-04-19T03:31:49Z")

</div>

Okay, so do the same thing, except use Model.

- If Inspection Type is Daily, then blank (empty)
- Else Model

Like that

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [April 19, 2021, 3:51am UTC](https://community.glideapps.com/t/relation-with-condition/25735/5 "2021-04-19T03:51:19Z")

</div>

hehe thanks Darren:)

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:52pm UTC](https://community.glideapps.com/t/relation-with-condition/25735/6 "2024-01-17T16:52:32Z")

</div>


