Oct 02 2019 08:24 AM - edited Oct 02 2019 08:25 AM
Hi,
I am creating a power app to view and make entries in a sharepoint list.
Now I created a new Screen with a gallery and the source is my sharepoint list. In the list, there is a field that is called "closed" and it has a drop down menu with yes/no. Now I want this particular gallery to only show the lines of the sharepoint list were the field "closed" is set to 'No'.
Is there any way to do that?
I experimented a bit by changing the following line, but nothing seems to work.
For any help I would be greatful!
Thanks
Christina
Oct 02 2019 11:10 AM - edited Oct 02 2019 11:12 AM
You can use the "Filter" command in the "Items" property to filter the list.
Here is my unfiltered app:
Here is my filtered app and code:
SortByColumns(Filter([@PowerAppsDemo], Closed = false), "Title", If(SortDescending1, Descending, Ascending))
Unfortunately, using "true" does not work as expected. Here is a version of the code for "true" but be warned you will get "Delegation" warnings.
SortByColumns(Filter([@PowerAppsDemo], Closed <> false), "Title", If(SortDescending1, Descending, Ascending))
I hope this helps.
Norm
Oct 02 2019 08:30 PM - edited Oct 02 2019 08:31 PM
SolutionIt’s a drop down aka choice column with those values and so it’s a delegated query now so if you use filter(data source,closed.value = “no”) in items you will get the result you need.
Oct 03 2019 03:58 AM
@ChrisWebbTech thanks for pointing that out. I missed it in the original post.
@christina_hoeglinger, Chris' code example should give you what you need.
Norm
Oct 03 2019 07:51 AM
Thank you so much! I actually was pretty close to this solution, i just forgot the .Value after Closed @ChrisWebbTech
I have follow-up question regarding your post: when you say delegated query, do you mean that the job gets passed on to sharepoint? I think I read about this, but I am not sure if this is what you mean here?
It has something to do with powerapps being only able to use a limited number of rows? 500 I think?
Thanks again for your help!
Christina
Oct 03 2019 07:56 AM
Oct 02 2019 08:30 PM - edited Oct 02 2019 08:31 PM
SolutionIt’s a drop down aka choice column with those values and so it’s a delegated query now so if you use filter(data source,closed.value = “no”) in items you will get the result you need.