Filter RG based on field in User data type

I am sure this is a simple one but my xmas brain is just not thinking straight and unable to find anything on the forum.

  • I have a list of impacts - these are effectively a task list of things to do for a project. (data type ChangeImpacts)
  • some ChangeImpacts are sensitive (marked with a sensitive flag in the ChangeImpacts data type)
  • Users have permissions (set in the user type). This obviously controls who can do what on the website.

My question is that I only want users with a certain permission - this is a field in the user table (lets call it Admin) to see all the Change Impacts (including sensitive ones). If you are not an Admin you see all the Change Impacts (but NOT the sensitive ones).

I can filter out the sensitive items for everyone (but Admin need to see them!). I don’t want to create a separate RG obviously. I am think I need to be clever with the ‘Only When’ possibly??

Hi there, @p_clavering… I would likely go about it by filtering out the sensitive items on the repeating group’s “main” data source (which it sounds like you are already doing), and then I would add a conditional to the repeating group that changes the data source to show all items (i.e., a search for ChangeImpacts with no constraints) when the Admin field for the user is yes. Make sense?

Hope this helps.


I think this will work - I am just playing with it now and it appears to work even when combined with search fields and other constraints - thanks @mikeloc

1 Like