Forum Academy Marketplace Showcase Pricing Features

Restricting data in repeating group

Hey all,

I’m building a ugc creator directory website.

I have a specific directory page where I want to show only results of creators in a repeating group that are “active” subscribers (paid via Stripe).

I’ve managed to get the repeating group to show data of all ‘ugc creator listings’ but I cannot seem to get it to only show creators that are created by users where ‘Subscription Status’ is “active”.

Here’s what I have so far that shows all creators:

I’m trying to setup the data so it only shows data of ‘UGC Creator Listing’ created by ‘User’ > ‘Subscription Status’ is ‘active’

I’m thinking that alternatively (and maybe easier) is there a way I can create a backend workflow that adds ‘Yes’ to a ‘Subscribed’ data field in ‘UGC Creator Listing’ data type, when a User becomes subscribed to Stripe?

Any help would be massively appreciated.

Hi, If you want to only show the results of the creator when doing a search for UGC-Creator-Listings add this constrain “Created by= current user” if you have the UGC-Creator-Listings attached to the user. Otherwise use the advanced filter.

Hi, thanks for the quick response.

I can apply “created by = current user” but where does the ‘subscription status’ come into this? Also correct me if I’m wrong, will this only show the results of listings made by the user viewing the repeating group? I want users to see results of all listings made by all users that have a ‘subscription status’ as “active”.

Only really two options here…

One is to do your initial search, then apply an advanced filter, where This Thing’s User’s Status is active.

Bear in mind, that requires first loading all of the search data to the page, then applying the filter do the data once it’s loaded…

So, depending entirely on how much data you’re dealing with, that may not be a problem in the slightest, or it might make your app unusably slow.

The other options (probably a better option, albeit slightly more involved) is to add a field to the UGC-Creator-Listing (either a yes/no field called something like: ‘User is Approved’, or status field called ‘User’s Status’), and then use that directly in your search constraints.

That will be a lot better for performance, especially if you have a lot of data. You’ll just need to make sure you update it whenever a User’s status is changed.

…you could also try: do a search for things who’s Created by is in: a list of User’s who’s status is ‘active’ - but that will probably be worse than using an advanced filter as you’d have to search and load the entire User database first (although maybe you could run that search on the backend??)

Thanks for your help Adam! I’m going to try this. Is there anyway I can get the ‘User Status’ to trigger to ‘Yes’ when Stripe changes the ‘Subscription Status’ to ‘active’?

I’ve been playing with the backend workflows and I see ‘New database trigger event’ and ‘new recurring event’, wondering if either of these will do the job.

Create a recursive backend workflow that will run through the list of things created by the User and set each one to User Status Active.

Then, you can either use a database trigger (when the User status changes) to kick off that recursive workflow, or you can just kick it off when you change the User’s status.

Thanks again Adam. I’ve just set this up after reading some guides, I don’t think it’s working though. Think I’m missing the bit that triggers it? Any help massively appreciated.

The ‘Low’s Delay’ in the API is a option set with number for delay.

Am I on the right track here?