This time around I'm looking to create a collection based on a filtered data source. I have a SharePoint list with several columns, one of which being names, and another one being a boolean true/false. I want to filter the data set to only return the names of people where the boolean column shows true. Then I want to take those names and put them into a collection. I've tried several different ways of setting the collection using the same sorts of filtering syntax I use for gallery filtering, but I haven't had much luck so far.
Any suggestions? Sorry if this has been posted before, I was having trouble finding a one-for-one.
Long known issue with filtering Sharepoint Yes/No fields...
Collect(collectionName, Filter(SharePointSource, BooleanField=1))
In this case you're using 1 for true and 0 for false conditions.
Thanks, Randy. That produces a formula error "left value is boolean type, right value is number type", unfortunately. The other thing that happens is I get errors on other fields that want to reference the collection for a particular item that will say "Invalid schema, expected a one-column table" since the filter is returning more than one result.
It has it's places where it seems to work well and others where not. Mostly depending on how many other things you have dependant on it or otherwise deriving from it.
I did a little sample on a SharePoint list with the 0 and 1 options and it worked fine. It was, however, a simple test. There were no other forms or collections or anything that were at play that derived from it.
You might want to take a look at this post for more information on another option.
Oh, one other - there is actually a "would be nice to fix this bug idea" here at this post.
Go cast your vote...
Read the announcement for more information!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Features releasing from October 2019 through March 2020
Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications