DB Query for data type as list

Hi,

I’m trying to figure out how best to do this query. I have a User Data Type that stores a list of users. I also have a Community Data Type that has a column called ‘Members’. A Community can have many members(ie. Users). This column is set as a list.

I’m just trying to query the DB to return a list of all Users who are part of that community. I have another function on a previous page that adds a user to a Community — just can’t figure out how I query Users but only those who appear in the Community —> Members list

Hi there, @gerardjfitz… maybe I am missing something here, but if you have a Members (list of users) field on the Community data type, you don’t need to search the User data type to get a list of users who are members of a particular community. If you simply reference the community’s Members field, you will have the list of users who belong to the community. For example, if you are viewing a specific community on a page, the expression Current page Community's Members should give you the list you need.

Best…
Mike

I was totally trying to over complicate this! That makes total sense and works. Thanks for pointing me in the right direction!

1 Like