How do you display component to specific user group?

Hell everyone,

I’m building a podcast app that sells access subscriptions on a Wordpress site. Depending on the users subscription, they will unlock “VIP Content” aka unique audio playbacks. In the Glide app, I want to set a condition to only display these audio recordings if the user’s email is associated with the VIP membership from the Wordpress site. Here’s what I’ve done so far:

  1. app is set to “Whitelist Emails” in settings
  2. my Google Sheet tab names are “Whitelist Emails” and “Audio Library”
  3. in the “Whitelist Emails” tab, I have two columns “Email” and “Access”
  4. the “Email” column contains ALL emails that the Wordpress site collects (both free & VIP)
  5. the “Access” column attaches “Yes” to VIP emails and “No” to free emails

Now, in the “Library” tab in my Google Sheet, I have various columns including playback image, descriptions, file size, etc. All of those columns are totally fine to display to ALL of the emails the Wordpress site collects, both free and VIP.

However, one column in the “Library” tab is named “VIP Playback” which is an audio component that plays audio bits that I only want VIP user emails to be able to see. Here’s what I’ve done to try to solve the issue, but it hasn’t worked:

  1. add the word “Yes” to the VIP Playback column to match the VIP Emails in step 5 above
  2. created a relation column in the Library tab that matches VIP Playback to VIP Emails
  3. toggle on “match multiple” in the relation column to pull in multiple emails
  4. relation column correctly pulls VIP Emails from “Whitelist Emails” tab
  5. go into audio component and navigate to features > visibility
  6. select filter to “show component when VIP Access is not empty” since I’m trying to display this component to only those VIP emails that the relation correctly pulled

I quickly realized that this is not a viable option since now the audio component gets displayed to ALL users since the visibility condition is met by the relation I created. Unfortunately, the visibility condition cannot be made into a “when user is signed in” which would then only display to VIP Emails in the relation column.

So what’s the workaround for this?

Thanks!

1 Like

You are really close. In addition to the relation column, create a Lookup column to pull in the emails from the relation. I know the relation is showing emails, but it just shows the first column of the relation to indicate it found a matching row. The lookup will actually pull back the email address.

Now for your visibility, set it to show if the Lookup column is signed in user.

That should be all you need to do.

You’re an absolute stud, Jeff!
I would have never thought of that last step. Thank you so much!

1 Like