I am attempting to create a flow which after updating the end date of a member record, then rechecks the SharePoint list the record is stored in for duplicates of that members email (this would occur if a member were to simultaneously hold two positions in my organization.)
I am unsure how to code the condition that would work for this. I have filtered the SharePoint Get Items action to return only results with a default end date (still active) and an email equal to the member in question. If the array is empty (no additional positions) then an email commanding our Listserv system to remove them is sent. If the array contains a value (they hold an additional position) then no action is taken.
Question: How to set condition whether SharePoint Get Items array is empty?
Solved! Go to Solution.
Hi @rich106,
Could you please show a bit more about the End Date column that you mentioned? Is it a Date type column in your SharePoint list?
Further, do you want to check if the result the "Get items" action returned is empty?
I have made a test on my side and please take atry with the following workaround:
Due_x0020_Date eq '2018-03-01'
Note: The Due Date column is a Date type column in my SharePoint list.
@empty(body('Get_items')?['value'])
Note: On your side, you should type the follwoing formula within Condition box:
@empty(body('Get_ISG_Members_List_-_Post_Removal')?['value'])
The 'Get_ISG_Members_List_-_Post_Removal' is the action name of your "Get items" action.
Image reference:
The flow works successfully as below:
More details about using expression (WDL expression) in flow actions, please check the following article:
Using expression in flow actions
Best regards,
Kris
Hi @rich106,
Could you please show a bit more about the End Date column that you mentioned? Is it a Date type column in your SharePoint list?
Further, do you want to check if the result the "Get items" action returned is empty?
I have made a test on my side and please take atry with the following workaround:
Due_x0020_Date eq '2018-03-01'
Note: The Due Date column is a Date type column in my SharePoint list.
@empty(body('Get_items')?['value'])
Note: On your side, you should type the follwoing formula within Condition box:
@empty(body('Get_ISG_Members_List_-_Post_Removal')?['value'])
The 'Get_ISG_Members_List_-_Post_Removal' is the action name of your "Get items" action.
Image reference:
The flow works successfully as below:
More details about using expression (WDL expression) in flow actions, please check the following article:
Using expression in flow actions
Best regards,
Kris
WORKAROUND: Note that you can no longer use Condition: edit in advanced mode.
So what I did was (after adding Get Items):
Thanks for this mate! Why we would even think to add a 'Compase' action before a condition I have no idea ... but it works!!! I've just spent a day and a half trying to get my flow to work and this little tip fixed it in 5mins.
Cheers
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
86 | |
60 | |
51 | |
43 | |
39 |
User | Count |
---|---|
89 | |
81 | |
74 | |
62 | |
44 |