Hi All,
I currently have a flow which translate the datetimeformat into the correct format I need.
The expression: formatdatetime(triggerBody()?['End_x0020_or_x0020_Termination_x'],'MM-dd-yyyy')
The above expression works perfectly, but I need to add some additional rules in place. The field I have can sometimes come back with a NULL value, which Flow does not like.
I tried the below expression but it didn't seem to work.. I need the expression to update the datetimeformat and also change the value from NULL to 'Never'.
Tried: if(equals(triggerBody()?['End_x0020_or_x0020_Termination_x'],'NULL'),'NULL'),'',formatdatetime(triggerBody()?['End_x0020_or_x0020_Termination_x'],'01/01/1901'),'MM-dd-yyyy'))
Can anyone point me in the right direction to be able to do both in the same expression?
Thank you!
Solved! Go to Solution.
Try using either the empty() or coalesce() function in your expression.
Documentation can be found here:
Try using either the empty() or coalesce() function in your expression.
Documentation can be found here:
Hi @ jmccann,
Could you please share a screenshot of the configuration of your flow?
Please take a try to add a condition under the trigger to check if the "End or Termination "column is null when an item is created in the sharepoint list.
Please refer to screenshot below to create the flow:
The expression in the condition as below:
@not(empty(triggerBody()?['End_x0020_or_x0020_Termination_x']))
The expression in the compose as below:
formatdatetime(triggerBody()?['End_x0020_or_x0020_Termination_x'],'MM-dd-yyyy')
When an item is created, if the "End or Termination "column is null, the flow would run successfully as below:
When an item is created, if the "End or Termination "column is not null, the flow would run successfully as below:
Please let me know if your issue could be solved.
Regards,
Alice Zhang
Thanks Scott! This worked a treat..
I used:
if(equals(coalesce(triggerBody()?['End_x0020_or_x0020_Termination_x'],'NULL'),'NULL'),'',formatdatetime(coalesce(triggerBody()?['End_x0020_or_x0020_Termination_x'],'01/01/1901'),'dd/MM/yyyy'))
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 |
---|---|
64 | |
23 | |
16 | |
15 | |
11 |
User | Count |
---|---|
121 | |
36 | |
32 | |
28 | |
26 |