I have a business process where I need to take the following steps....just not sure how to code it in FLOW:
Step 1: Determine if [Funded End Date] is NOT blank
Step 2: IF [Funded End Date] field IS blank do nothing
Step 3: IF NOT blank determine if [Funded End Date] is 1 day greater than today
Step 4: If YES send an e-mail to specific people | If NO do nothing
Run this everyday at a specific time
This seems to be a pretty standard problem and I've used this code @equals(formatDateTime(item()?['Funded_x0020_End_x0020_Date'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), 10), 'MM/dd/yyyy')) before to send notices.
The issue I'm running into is that the not all the Funded End Date fields have data, and won't. So I the first part of the code throws an error becuase it's trying to evaluate a blank field.
Thanks in advance for any help! 🙂
Solved! Go to Solution.
@DarenD If you have right date, then you should get an e-mail if both the first condition and the second condition evaluates true. Can you find any where both are true? Or at least the first condition?
So I moved the e-mail notice above the next condition and I did get a notice, but only one and only for the item with the closed due date (8/30/2018). I have about 100 items with funding expiration dates so I'm wondering if there's an issue with the first evaluation as well?
Hmm .. something's not right. The way you had it setup in the post, you should get an e-mail everytime there is a date, regardless what that date is, since the date compare function is after your e-mail.
Since I have 3 of these workflow that I need with different dates I'm still working on using the variable option as well. However, I messed it up somewhere:
I'm not familiar with the variables but the error looks like you are putting a string value somewhere where Flow expects a boolean. Once you initialize the variable, I don't think you'd need to set it, you'd just compare with the Condition step and see if it evaluates true or not.
I've only done a Flow like this without a variable. Sorry I can't help you further. Your formulas look good to me.
I came across a similar issue today and couldn't find a solution in the community, but then found a workaround that may be of interest for some users for determining if a date field is blank:
Value(Today()) - Value('Due Date') = Value(Today()) returns True if Due Date is blank.
To check if Date is empty, you don't need empty() or any other function on the date itself. In the condition, select the SharePoint column (or your data source) directly from Dynamic content. Set criteria to Is Equal to or Is Not Equal To as per requirement. In the compare box select the Expression as null. Do not enter 'null' or null or leave blank. Enter null in expression, select the function and click OK.
It should show like this as a function -
You can use the value function to change the date to a number. If that number is zero then its blank (most likely as the value of an empty date/time column's epoch time is 01/01/1970).
If(Value(yourDateHere)=0, "Date is Blank", "Date is not Blank")
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
Check out the community blog page where you can find valuable learning material from community and product team members!