I want to take my large-ish table and reduce it to what needs to be looped over using multiple filter conditions. Basically, how do I do this?
I tried to enter my parameters into a Filter block and switch to advanced mode to get the code, but I'm still missing something.
Here is the Advanced Mode for the first parameter:
@greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula'])
Here is the Advanced Mode code for the second parameter:
@(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula'])) and (equals(empty(item()?['Audit-Recorded-By']), true))
Here is a list of my failed attempts:
Solved! Go to Solution.
Hi @BenDonahue ,
Could you please share a screenshot of the configuration of the flow?
You could take a try with expression below:
@and(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']),greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']),equals(empty(item()?['Audit-Recorded-By']), true))
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
I guess you are referring to 'Filter array' action block, right? If your second 'parameter'...
@(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula'])) and (equals(empty(item()?['Audit-Recorded-By']), true))
...seems wrong to me. I would try this instead:
@And(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']), equals(empty(item()?['Audit-Recorded-By']), true))
AS you said, OData expressions syntax differs from WDL expressions syntax
More on Sharepoint ODATA syntax here:
https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/
More on and() related ODATA expressions syntax here:
Hope this helps
Proud to be a Flownaut!
For my purposes, here is the final, functional code I am using inmy Filter Array block:
@And(greaterOrEquals(body('Current_time'),formatDateTime(addDays('1899-12-30',int(item()?['Audit-Due-Date-Formula'])),'yyyy-MM-dd')),equals(item()?['Audit-Assigned-To-Email'],items('ATE-Roster')?['OM Email']),equals(empty(item()?['Audit-Recorded-By']), true))
This was constructed by creating these three statements and testing them, then adding an "and" and some commas and 2 parentheses:
Also, thank you to @efialttes and @v-alzhan-msft for your help and guidance. I would not have the solution without your assistance, to be sure.
Hi @BenDonahue ,
Could you please share a screenshot of the configuration of the flow?
You could take a try with expression below:
@and(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']),greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']),equals(empty(item()?['Audit-Recorded-By']), true))
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
I guess you are referring to 'Filter array' action block, right? If your second 'parameter'...
@(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula'])) and (equals(empty(item()?['Audit-Recorded-By']), true))
...seems wrong to me. I would try this instead:
@And(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']), equals(empty(item()?['Audit-Recorded-By']), true))
AS you said, OData expressions syntax differs from WDL expressions syntax
More on Sharepoint ODATA syntax here:
https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/
More on and() related ODATA expressions syntax here:
Hope this helps
Proud to be a Flownaut!
First, thank you for, again, supplying your time and effort to help me.
I am trying to use this ODATA query in a "List rows present in a table." I don't know if that changes things, but I am getting a null return for my "item()?['']" it seems:
for this expression
and(greaterOrEquals(body('Current_time'), item()?['Audit-Due-Date-Formula']), equals(empty(item()?['Audit-Recorded-By']), true))
Currently, I have data in all these fields. In the future, I might not, so I will have to deal with that, too.
If I could at least get this expression to work, I would have a very short list to work with:
Here is some context:
Thank you again for your assistance. I will get into the sharepains article now.
Hi!
THe Filter Query error comes from the fact it expects an ODATA expression as its input.
And, ODATA syntax is different from WDL sintax.
GReat article on ODATA expressions here:
https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/
Hope this helps
Proud to be a Flownaut!
For my purposes, here is the final, functional code I am using inmy Filter Array block:
@And(greaterOrEquals(body('Current_time'),formatDateTime(addDays('1899-12-30',int(item()?['Audit-Due-Date-Formula'])),'yyyy-MM-dd')),equals(item()?['Audit-Assigned-To-Email'],items('ATE-Roster')?['OM Email']),equals(empty(item()?['Audit-Recorded-By']), true))
This was constructed by creating these three statements and testing them, then adding an "and" and some commas and 2 parentheses:
Also, thank you to @efialttes and @v-alzhan-msft for your help and guidance. I would not have the solution without your assistance, to be sure.
Issue solved, right?
Hurray! Great Job!
Thanx for making this community great!
Proud to be a Flownaut!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!
User | Count |
---|---|
32 | |
32 | |
22 | |
22 | |
19 |
User | Count |
---|---|
56 | |
56 | |
41 | |
37 | |
29 |