Hello,
I have a calculated value in a SharePoint list called DaysToClose that calcualtes the days remaining before a due date. I want to notify the owner when an item is due in 5 days, 0 days, or less than 0 days.
I think I have it set up correctly but it gives me an error.
Below is the flow:
Not quite sure what I have wrong here. Seems simple enough. Does it have something to do with 95.000000 vs 95? But shouldn't it simply go to the default route since 95.0000000 doesn't equal 0? Seems like a data type issue to me but I'm not sure how to fix it.
Thanks,
Craig
Hi @Craig99b,
Could you please share a full screenshot of your flow's configuration?
Could you please show a bit more about your SharePoint list?
I have created a SharePoint list on my side and the data structure of it as below:Note: TaskName column is Single of line text type column, Executor column is a Single line of text type column, Due Date column is a Date type column and DaysToClose column is a Calculated type column. The DaysToClose column data structure as below:
Within above formula box, type the following formula:
=ROUND([Due Date]-NOW(),0)
Date type returned from this formula set to Number.
I have made a test on my side and please take a try with following workaround:
int(item()?['DaysToClose'])
Add two Case branches (Equals 0 and Equals 5). Within Case 0, Case 5 and Default branches, add a "Send an email" action separately.
Image reference:
The flow works successfully as below:
Best regards,
Kris
I faced the same issue today and then got to this post. Was able to resolve it by converting the 'Switch On' dynamic value to int and then comparing it to multiple case values. Hope it helps.
Hi @v-xida-msft ,
How can we address negative, positive and 0 in a Switch statement?
Example:
Thank you
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
32 | |
31 | |
24 | |
24 | |
21 |
User | Count |
---|---|
64 | |
57 | |
43 | |
37 | |
29 |