My purpose: add a convertimezone expression in my flow and also allow the user to leave as blank
My problem: if users leave date as blank, the flow will fail as below:
Solved! Go to Solution.
Hi @picnicfunL ,
You could try to use the If() function to determine if the Date field value is empty and if so, do nothing. If it is not empty, execute the convertTimeZone() function.
Expression reference:
if(equals(triggerBody()?['Date'],null),'',convertTimeZone(triggerBody()?['Date'],'Dateline Standard Time','Central Standard Time','yyyy-MM-dd'))
Best Regards,
Hi there! Are you using the date later in the Flow? Wondering if you can just use UTCNow() if it is blank, and then just ignore the output of this step later?
Just a thought.
-Ed-
If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
Yes, I need the time for email, also the time is not "now" so I am not able to use UTCnow()
So, If it's required, what is your intent if the user leaves it blank?
It depends on the situation, at the begin, users don't know the correct time, they will fill out the time when the event is restored.
Now I add condition " time is equal to ture"
It might help if you can chart out what the journey should look like, right? It sounds like there is information required before the user actually has it, in some cases. If that's the case, it might be necessary to plug in a 'sample' value to move forward, and then update it later.
Keep us posted.
-Ed-
Hi @picnicfunL ,
You could try to use the If() function to determine if the Date field value is empty and if so, do nothing. If it is not empty, execute the convertTimeZone() function.
Expression reference:
if(equals(triggerBody()?['Date'],null),'',convertTimeZone(triggerBody()?['Date'],'Dateline Standard Time','Central Standard Time','yyyy-MM-dd'))
Best Regards,
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!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
41 | |
39 | |
30 | |
29 | |
29 |