Hello, I'm trying to use lookup and filter but not sure how to go about this,
Currently I have two CDS:
1- L5QuestionList {L5QuestionNumber,Heading}
2- QuestionHeading {HeadingID, HeadingDescription}
In PowerApps, currently I have a Gallery that display items = QuestionHeadings
Question: How do I filter the gallery to only display a certain heading?
**I want it to lookup from Source L5QuestionList and only display HeadingDescription from source QuestionHeading if L5QuestionList.Heading = QuestionHeading.heading (so that if there is no question under a heading it won't be display)
Solved! Go to Solution.
Here's a nice one-liner solution to your question. Put this code in the Items property of your gallery for QuestionHeading.
Filter(QuestionHeading,HeadingID in L5QuestionList[@Heading])
---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
Here's a nice one-liner solution to your question. Put this code in the Items property of your gallery for QuestionHeading.
Filter(QuestionHeading,HeadingID in L5QuestionList[@Heading])
---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
Hi, @mdevaney thank you for your reply, I have tried your code but i got error:
Filter(QuestionHeading,HeadingID in L5QuestionList[@Heading])
it doesn't recognize L5QuestionList data source, so I got an error saying: "The specified column is not accessible in this context"
I tested the solution using by making a collection where Heading was a string type column and it worked. The reason it does not work you must be that Heading is a different column type such as a complex column. I'm not sure what to do next here...
@mdevaney thank you
in the two CDS i have QuestionHeading with HeadingID as primary key
and in QuestionList I have a Heading which is a lookup from QuestionHeading
I'm not very familiar with collection, I will try and look at some example and try to approach filtering with collection instead...
User | Count |
---|---|
254 | |
106 | |
84 | |
51 | |
43 |