I have a data field for user called qualifications which holds a list of qualifications(chef, executive, etc etc), and I have a repeating group filled with items that have a field called qualification with a singular value(executive or chef). I would like add constraints to the repeating group to display only the items that are in my user’s list of qualifications. How do I go about doing this.
a datatype( called posts) with fields:
-qualification
-description
and the user datatype with fields:
-qualifications(list)
-name
-etc etc
my goal is to filter a repeating group of type content: post, where the data source is posts. and i would like to add a constraint that would only allow posts with qualifications the user has.
Then this RG will need to be type ‘Qualifications’, and as long as your ‘qualifications’ data type is a data field of ‘User’ (as a list of qualifications), then you should be able to reference it as below:
RG type of content = Qualifications
Data source = Current User’s Qualifications
You won’t need to use a filter expression as the ‘Current user’ part will do that already. This wouldn’t be the case if you specifically wanted to show other users’ qualifications though.
Yes - but you need a Qualifications data type in order to store the qualifications’ details (ie: qualification title, who has these qualifications etc) and to have it as a functioning date field of User, otherwise you can reference ‘qualifications’ data field on User data type but there won’t be any data associated to qualifications to show.
Have a look at the database layout in the demo app I’ve linked.
So you’ll need to use an Advanced Filter for this. On the Repeating Group’s Data Source, Search for Posts, choose :Filtered. And then in the List Filter window that pops up, choose 'Advanced': Current User's Qualifications [contains list:]This Post's qualifications
i understand but that isn’t what im attempting to do, i would like to display only the post that the user is qualified to see, as in how do i filter a repeating group to only show the posts that have a qualification that is matched in my user’s list of qualifications:
The first thing I’m seeing is User’s Qualifications (plural) vs post’s qualification (singular). Is Qualification on the post a list or just 1 item? If so, instead of Contains List you should be able to just use Contained. Or, try adding ‘used as list’ to the end of the argument.