# Which to use: Relation/Lookup/Queery

**URL:** <https://community.glideapps.com/t/which-to-use-relation-lookup-queery/77656>\
**Category:** Ask for Help\
**Created:** [November 6, 2024, 11:55am UTC](https://community.glideapps.com/t/which-to-use-relation-lookup-queery/77656 "2024-11-06T11:55:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![theweedyburton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/theweedyburton/32/81109_2.png) [@theweedyburton](https://community.glideapps.com/u/theweedyburton)\
**Post date:** [November 6, 2024, 11:55am UTC](https://community.glideapps.com/t/which-to-use-relation-lookup-queery/77656/1 "2024-11-06T11:55:06Z")

</div>

Hi there, I am trying to determine if a person is on duty or off duty on a day  
I have:  
7 Boolean switches for Sun thru Sat  
An excel formula determining which day of the week it is.  
An ONDUTY column that should show ON/OFF depending on whether the boolean switches are switched on or off for that day of the week.

Does anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 6, 2024, 11:23pm UTC](https://community.glideapps.com/t/which-to-use-relation-lookup-queery/77656/2 "2024-11-06T23:23:21Z")

</div>

First, move your “day of week” column to Glide. Use a math column with WEEKDAY(N), N being the “Now” value.

You’ll receive a number that corresponds with the current day. Proceed to use an if-then-else column.

If weekday equals 1 then return the value in the Sunday column, 2 then return the Monday column and so on.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 13, 2024, 11:23pm UTC](https://community.glideapps.com/t/which-to-use-relation-lookup-queery/77656/3 "2024-11-13T23:23:33Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
