# How to make a relation between Date Range

**URL:** <https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966>\
**Category:** Ask for Help\
**Created:** [February 15, 2023, 4:07am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966 "2023-02-15T04:07:27Z")\
**Posts on this page:** 7\
**Page:** 2

<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:** [February 15, 2023, 6:46am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/21 "2023-02-15T06:46:23Z")

</div>

Oh I see that’s what i thought on your first explanation. I understand your solution but. If I need the relation on their own Sheet . It is possible ?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 15, 2023, 6:47am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/22 "2023-02-15T06:47:46Z")

</div>

yes… you can record that with the row ID with a sum equal to 2… that will be your relation…  
when they are creating a new record for the timesheet… make a date set in sheet 1 before you create a record of that.  
I hope I understand your process correctly 😉

---

<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:** [February 15, 2023, 6:52am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/23 "2023-02-15T06:52:42Z")

</div>

Ok, what if the data is already there. And to check the relation?  
your steps is the solution for the situation which data is not yet in right ? but what if its there, and need to check which have relation for both sheet ?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 15, 2023, 6:55am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/24 "2023-02-15T06:55:56Z")

</div>

App workflow:

1. worker applies for a leave
2. leave is approved and recorded in sheet 1
3. worker is adding a new time sheet record (sheet 2)
4. check if a new record is matching dates range in leaves data (sheet 1)

Is that correct?

1. Mark the new record as invalid if it matches dates range?  
or
2. Do not record new timesheet records?

---

<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:** [February 15, 2023, 7:03am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/25 "2023-02-15T07:03:07Z")

</div>

1 to 5 is correct. on step 6, we can also record or create the row for the leave date but. with different status let say status “Off Day/on Leave” instead of “approved/rejected/pending approval”

Depends on the situation which is more easier . But right now, the most important thing that I really need on the Sheet 2 can have the relation column whether its already in Sheet 1 or not.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 15, 2023, 7:08am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/26 "2023-02-15T07:08:39Z")

</div>

Then you need to break step 3 into two phases…  
a. worker enters a date  
(two-step custom action)  
b 1. the date is copied to sheet 1, and check if it is valid… return the row ID of matched date range  
b 2. record new timesheet

I have to go… I hope this will put you on the right track to solving your problem.

---

<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:** [February 15, 2023, 7:21am UTC](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966/27 "2023-02-15T07:21:22Z")

</div>

yes @Uzo . Its 2.20 am in your place right. Have a good rest.

[Previous page](https://community.glideapps.com/t/how-to-make-a-relation-between-date-range/57966.md?page=1)
