Preventing an empty RG cell appearing

I suspect my other query may not be possible, so I’m asking about another way to prevent my Repeating Group showing empty results.

Ideally one would prevent an empty RG cell by making sure the Search only returns results that have a value. However, in my case I have another RG within the first RG that lacks the results.

So my “top” RG is Users. Within each User cell I have another RG that shows their Projects. The Search for the Users does not know whether or not those Users have created any Projects so I can’t prevent Users with no Projects being shown.

(I have since added a “last uploaded” field to the Users, but that doesn’t yet help me as most Users were created before that existed).

Any way to prevent results from the top RG showing when it is the sub-RG that lacks the results? I apparently can’t collapse the Group horizontally so that does not help.

Currently I have a “project coming soon” image, but realised that people who don’t upload Projects probaly includes Spam sign-ups, so I would rather just exclude them from the page altogether. It relates to this new page in my app: Discover the world's top miniature painters and commission artists

In fact, you can prevent user with no project to be in the RG.
For that, use :filtered and advanced in filter. This step after depend on your setting.
If project have a link to user, you will use: Do a search for project where user = this user:count > 0
If user have link to project, you will use project:count 0>

Hi there, @major_groove… because advanced filters can be slow, you could also consider having a field in the User data type that is a list of projects, and then you would have an easy way to exclude users by making sure to only include users where the count of their associated project list is greater than 0. Just food for thought.


1 Like

Hi Mike, indeed that’s what I should have done from the start. I since added the “last uploaded” field so I can use that to filter out people later. Problem is just that most users don’t have any “last uploaded” data. I suppose I could create an API workflow to fix that for all users, but I am not so great at APIs, so I will live with the slowish page for now.

@Jici - thanks for that. I had tried the filter, but didn’t realise I could make it advanced. As Mike suggests I suspect this page won’t scale well, but when I need to I can switch to use the Last Uploaded field, or run the API.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.