# Using Visibility comparing 2 lists

**URL:** https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371
**Category:** Ask for Help
**Created:** [November 17, 2022, 2:02pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371 "2022-11-17T14:02:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [November 17, 2022, 2:02pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/1 "2022-11-17T14:02:40Z")

</div>

I have a column in my User Table where users can select multiple attributes from a Choice Component (attribute1, attribute2, attribute3) to add their their profile.

I have Items Table where each item also has a column for attributes that were selected from a multiple choice component (attribute1, attribute2, attribute3, attribute4 and attribute5).

I want to display a component using a Visibility setting only when the Items attributes contains one or more of the User’s pre-selected attributes.

If ItemAttributes includes User → UserAttributes, display.

Problem is, I’ve tried to use Split Text, Joined Text, Make Array on both columns in each Table but seems like it has to contain ALL attributes as the component isnt showing.

Any tips?

---

<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: [November 17, 2022, 2:05pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/2 "2022-11-17T14:05:54Z")

</div>

Convert both lists into a single array (I’m sure you know how to do that), and then run that array through the [Duplicated Items](https://www.glideapps.com/plugins/duplicated-items) plugin. If it returns anything, then you have overlapping items.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [November 17, 2022, 2:37pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/3 "2022-11-17T14:37:01Z")

</div>

OK thanks, I think I got it… could you tell me if there is a more efficient way?

On Items Table:  
Single Element Array → User Profile → Attributes  
Single Element Array → ItemAttributes  
Append Array → 2x Single Element Arrays  
Joined List → Append Array  
Split Text → Joined List  
Duplicate Array → Split Text

This has provided me the duplicates between the User Attributes and Item Attributes.  
The Visibility on the component would be “If Duplicate Array is Not Empty”

---

<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: [November 17, 2022, 2:47pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/4 "2022-11-17T14:47:23Z")

</div>

I would do:

In your Items table:

- Split Text Column, targeting User Profile → Item Attributes
- Split Text Column, targeting Items → Attributes
- Make Array column, combining the previous two columns
- Find Duplicates, targeting the Make Array column

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [November 17, 2022, 3:02pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/5 "2022-11-17T15:02:56Z")

</div>

Perfect, thanks! I always forget about these Plugins!

---

<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 18, 2022, 3:03pm UTC](https://community.glideapps.com/t/using-visibility-comparing-2-lists/54371/6 "2022-11-18T15:03:31Z")

</div>

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