Hi everyone,
Hope you are having a good day!
I am creating a flow that will get items from a sharepoint list with this filter on the query:
I've tried both,
ApprovalID eq <integervariable> and Cancelled eq 'true'
@yashag2255 hope you can help.
@RobElliott
and
ApprovalID eq <integervariable> and Cancelled eq true
but neither seems to work since the query gets the item with the correct integer value but does not take into consideration the second query filter I've used, the 'Cancelled' column is a Yes/No Column in Sharepoint.
I'm patching the column "Approved" in Powerapps and after the patch, the do until of my flow stops even though there is no "Cancelled" eq true.
Solved! Go to Solution.
@Anonymous filter queries don't like Yes/No columns. You can put the ApprovalID in to the filter query but then you'll need a condition to check for Cancelled is equal to true.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
@Anonymous filter queries don't like Yes/No columns. You can put the ApprovalID in to the filter query but then you'll need a condition to check for Cancelled is equal to true.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
I have successfull used a filter query in a Get Items action. The column being tested for is: Details. When I wanted to bring in items whose value of Details = No, my filter query is:
Details eq 'false'
The key is the use of single quotes around either 'true' or 'false'
When its a Yes/No field you want to filter query it for when its true you use the not equal to operator "ne" and not "eq".
Example1: Cancelled ne false
Example2: ApprovalID eq <integervariable> and Cancelled ne false
Thanks, @JoshuaGWilson, this absolutely worked.
It's also absolutely crazy that the equality operator is broken. 😬
"eq" is not broken 🙂
"Cancelled ne false" does not actually work, this filter statement will always evaluate as True, whether the column is set to Yes or No, as none of the Cancelled column values will have the value of "false"...
I.e. the Output will show Items where Cancelled is set to Yes and it will also show items where Cancelled is set to No.
Yes/No Columns must be evaluated as 1/0.
For your use case it would be:
Cancelled eq 1
Filtering with "Cancelled eq 1" will show all items with Cancelled column value set to Yes.
Test it out with a simple Test List with few rows before using it in Production.
Totally true, worked for me! Thanks
This is driving me crazy.
When I set the column eq 1 it works perfect but not when column eq 0.
This is an old topic, so, I'm sorry to dredge it up. But here is the reason:
If a document has not been tagged with NotifiedFinance = Yes, then the NotifiedFinance tag isn't set in the document metadata (If you download the data from Get Items (Properties) you'll see it's missing from all the documents where the tag has never been set.
Examples:
Doc1.docx has been set with NotifiedFinance to Yes -> Tag is added for NotifiedFinance to it's metadata with value 1.
Doc2.docx has not been set with NotifiedFinance to Yes -> No tag on the document or metadata.
Doc3.docx has been set with NotifiedFinance to Yes, but later was changed to No -> The NotifiedFinance tag exists in the Metadata of the document with a value of 0.
I'm not sure why SharePoint doesn't add "null" state values when tags are added, but that is the reason why it's not showing up when you try to set it to eq 0. Setting it to not equal, ne 1, will get all documents that are set to 0 (In theory)
Edit: Clarification of initial sentence
Please use 1 for true and 0 for false instead of Yes/No or True/False
E.g :- Cancelled eq 1
I have faced this problem today and what I found if you have added "yes/no" column when you have already some records in the list the old record will not be filtered as per your expectation, so for old records you need to manyally update yes no column for each record of write some automate to update it.
the condition would be like as below
Thanks,
like if it works for you 🙂
Sometimes (actually, mostly, it seems) M$ logic in creating these tools is astoundingly obtuse. I really think they must put a lot of effort into dreaming up ways to slow this tool down and frustrate its users.
After 2 hours of experimentation and reading through posts on this site, this is what finally worked for me. My query ended up as this:
(MYOBimportgenerated eq 'No') and (Approved eq 1)
Both my columns MYOBimportgenerated and Approved are Yes/No columns. I tried creating a different column name for the Approved Column in case the word Approved was causing issues but that didn't work either. The only thing that worked for me is No = 'No' and Yes = 1
Far out M$ could you make it any more confusing???
Thank you YesNoColumnName eq 1 for me finally worked!
@KarlinOz excellent, I would never have tried 1 and 'No', nor do I understand the logic behind it, but yes indeed, it works. 1 is true and 'No' is false...
For me I got it solved by using a combination of :
field eq 1 - for a true case
(field eq '' or field ne 1) - for a false case
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
127 | |
54 | |
38 | |
26 | |
21 |