Hi,
My app has a flow which imports several collections when a user logs in. One of these is named 'Park' and contains a 'Category' which I need a gallery to access. The issue is that this is on level 4 of the table structure. I need a gallery of the values in 'green' but can't seem to get to it. Any ideas?
Hi @AFE2E
Looks like Categorydetail is a table. So we have to use First() even though you may have a single record.
Category: Park.category.First(categoryDetail).Text
Please share the error. It helps to troubleshoot.
Hi,
I have tried your suggestion..
I get the following errors. 'Invocation of unknown or unsupported function' when hovering over the park.category section. Then I get 'Name isn't valid. The identifier isn't recognised' on categorydetail and 'Invalid use of '.' on /Text at the end
Hi @AFE2E
Few troubleshoot items
Park.category.categoryDetail.Text
Hi @AFE2E,
Have you solved your problem?
Do you want to add a record to your ParkCategories?
Could you please share more about your need, access this value in a Gallery or add it into a collection?
If you just want to access this in a Gallery, please set the Text property of the Label as below:
ThisItem.Category.CategoryDetail.Text
If you want to get this value into another collection, please modify your Collect() formula as below:
Collect(ParkCategories,{Category:First(Park).Category.CategoryDetail.Text})
Note that you should determine which record in the Park do you want to access to, I assume that you want to access to the first record.
Hi,
Thanks for your response.
I'm trying to display a question bank based on the categories for each park. So the Park is collected when the user logs in. The categories are pulled from the DB in to a collection. Then I want to use a gallery to display the questions for the categories that this Park has assigned to it.
I've tried both of your methods above and both work up to the point category.categoryDetail but the .Text is always underlined in red and says 'Name isn't valid' I just can't seem to get to that last level to extract the value. Please see my collection structure below...
Hi @ITBird
I created a collection similar to you to test it.
ClearCollect(
Park,
{
Key: 0,
Address: {Street1: "900 Main St"},
category: {
organization: 1,
categoryDetail: {
Description: "Audit",
Text: "First Aid",
Key: 95
}
}
}
);
Collect(
ParkCategories,
{Category: First(Park).category.categoryDetail.Text}
)
When I assign Park or Category to Gallery as Items property than to display "Text" column
ThisItem.category.categoryDetail.Text
And also able to collect the "Text" column to the ParkCategories collection
Can you try this sample and see where the problem is.
Hi @ITBird
Please let us know if anything needs on your post. We can help with this.
Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.
User | Count |
---|---|
258 | |
110 | |
90 | |
52 | |
44 |