Hi, I’ve got a repeating group that I am trying to filter and I seem to get it to work. I’ll try to explain the issue and what I’ve tried and maybe someone can help me out:
My app hosts project and user data for architecture firms. I have a Project datatype and a Team Member/User datatype. The Project datatype has many fields, but the two relevant ones are “Team Members” and “Project Type.” Team Members evaluated to a list of Users/Team Members, while “Project Type” evaluated to an option set for types such as “Retail” projects or “Residential” etc. The “Team Member” datatype also has a field that evaluates to a list of “Project Types.” This is a bit redundant to have but whatever. The point is to be able to view a project profile and see all of the Team members that worked on that project. Or to be able to view a Team Member profile and see all of the projects they have worked on.
Right now, I’m trying to build out my search feature using repeating groups. I have built out filters for other fields that work, but the one I can’t get to work is this: When searching Team Members, I want to be able to search for Team Members who’s Project Experience includes projects with a specific “project type,” such as retail or residential.
So essentially I’m trying to figure out how to query what Team Members have projects in their project fields that have a specific project type and use that as a filter to a repeating group.
Project
1.1 “Team Members” that is a list of Users
1.2 “Project Type” that is a single value from Project Type OS [retail, residential…] 1.3…1.N → other fields
User
2.1 “Project Types” that is a list of values from Project Type OS [retail, residential…] 2.2…2.M - > other fields
Make a repeating group, where data source is Current Project’s Team members
You can add to your User DT a field that is a list of projects. Or create a separate DT to store User - Project connection.
But if you are not going to change the structure - under user profile (I’ll take it a page with content type User) you add a repeating group of type Project. Than you are doing a search for Projects with constraint current page user is in Team Members