# QQ - Matching in Relations

**URL:** <https://community.glideapps.com/t/qq-matching-in-relations/63526>\
**Category:** Ask for Help\
**Created:** [July 5, 2023, 1:34pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526 "2023-07-05T13:34:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [July 5, 2023, 1:34pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526/1 "2023-07-05T13:34:50Z")

</div>

Quick Question: When matching for a single row (not selecting multiple match) in a relation where there are multiple matchable rows - which row is returned?

For example:

Would a Relation Match “Rank = First” consistently return Row ID 1 and “Rank = Second” return Row ID 2 and NOT match Row ID 3 and 4 respectively?

Thanks

Row ID - Rank - Letter  
1 - First - A  
2 - Second - A  
3 - First - B  
4 - Second - B

---

<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:** [July 5, 2023, 1:39pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526/2 "2023-07-05T13:39:51Z")

</div>

A single relation will always return the first matching row.

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [July 5, 2023, 2:04pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526/3 "2023-07-05T14:04:11Z")

</div>

Thanks Darren - I assume same results within filters in a Screen / Tab? If MyTerritory matches multiple territories it will return the first one in the table.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e864ea2a8da57f61e1071498db8b1d863f9831b9.png)

---

<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:** [July 5, 2023, 2:15pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526/4 "2023-07-05T14:15:38Z")

</div>

You mean a filter at the screen level? Then yes, you’ll get the first matching row.

A filter on a collection, of course, will return _all_ matching rows.

---

<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:** [July 6, 2023, 2:16pm UTC](https://community.glideapps.com/t/qq-matching-in-relations/63526/5 "2023-07-06T14:16:36Z")

</div>

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