Hi!
I created a flow condition where if date today is equal to 'Review End Date and Time' it will trigger a notification where the recipient will have the option to choose on when to complete the revision of the document.
Here is the conditional flow:
Condition is
utcNow('MM-dd-yyyyTHH:mm tt')
is equal to Review End Date and Time (mm/DD/yyyy hh:mm AM/PM format). However this doesn't trigger any notification when I did a test.
Before I did my test, I changed the Review Date and Time to today's date and changed the time to I can track if the test works. On checking it showed Expression result is 'false"
@earlbrian String inside utc() is not in exact format as in your date column. Make sure that both return same time format.
Please try this
utcNow('MM/dd/yyyy') is equal to formatdatetime(' Review End Date and time','MM/dd/yyyy')
Change review end date and time with your dynamic column name.
Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.
Hi @Hardesh15 when using the suggestion it shows expression is invalid when adding equal to which is
formatdatetime('outputs('Get_file_properties')?['body/ReviewEndDateandTime']','MM/dd/yyyy')
Hello @earlbrian ,
remove the apostrophes around the outputs('Get_file_properties')?['body/ReviewEndDateandTime'] dynamic content. Apostrophes are needed only if you define a specific value, if you're using dynamic content you don't need apostrophes in the expression.
formatDateTime(outputs('Get_file_properties')?['body/ReviewEndDateandTime'],'MM/dd/yyyy')
Hi @tom_riha I followed your suggestion and got the error below
Unable to process template language expressions for action 'Condition' at line '1' and column '24287': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
@earlbrian please check your return date is null or not. If it is null use this expression then,
formatDateTime(if(empty(outputs('Get_file_properties')?['body/ReviewEndDateandTime']),Null,outputs('Get_file_properties')?['body/ReviewEndDateandTime'],'MM/dd/yyyy'))
Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.
@Hardesh15 used that expression and got an error
Unable to process template language expressions for action 'Condition' at line '1' and column '18114': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '4' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.
These are the expressions used
@earlbrian See expression- in last two brackets are creating problem. It is typo from my side.
formatDateTime(if(empty(outputs('Get_file_properties')?['body/ReviewEndDateandTime']),Null,outputs('Get_file_properties')?['body/ReviewEndDateandTime']),'MM/dd/yyyy')
Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.
@Hardesh15 sorry for the late response. IT showed an error. I have another question related to that.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
72 | |
27 | |
22 | |
15 | |
13 |
User | Count |
---|---|
141 | |
43 | |
42 | |
34 | |
30 |