Hi, I would like to query our portal for group items by category.
After loading the portal and finding the group by id, I am giving the group to this function as group0:
const getLayers = async (group0: any) => {
let queryParams = {
query: `categories: ["/Categories/CDC Social Vulnerability Index/Theme 1: Socio-economic"]`,
}
const { results } = await group0.queryItems(queryParams )
return results
}
I have tried several iterations of this search string. If I am only searching one category level (/Categories/ALICE Households), it works , but if I go into a nested category (like Theme 1 here), it returns all of the layers in the group.
I have tried categories: and groupCategories:, with curly braces, with brackets, with no braces, just a string, with quotes and without. Has anyone had any success fetching layers that have been categorized in a portal group in a nested category schema?
With gratitude,
Michelle