cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Allow Null value for covertimezone expression

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: 

 

 

565.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Allow Null value for covertimezone expression

 

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.

34.PNG

Expression reference:

if(equals(triggerBody()?['Date'],null),'',convertTimeZone(triggerBody()?['Date'],'Dateline Standard Time','Central Standard Time','yyyy-MM-dd'))

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Super User II
Super User II

Re: Allow Null value for covertimezone expression

@picnicfunL 

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.

Highlighted
Frequent Visitor

Re: Allow Null value for covertimezone expression

Yes, I need the time for email, also the time is not "now" so I am not able to use UTCnow()

Capturefef.PNG

Highlighted
Super User II
Super User II

Re: Allow Null value for covertimezone expression

So, If it's required, what is your intent if the user leaves it blank?

Highlighted
Frequent Visitor

Re: Allow Null value for covertimezone expression

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"

Highlighted
Super User II
Super User II

Re: Allow Null value for covertimezone expression

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-

 

Highlighted
Community Support
Community Support

Re: Allow Null value for covertimezone expression

 

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.

34.PNG

Expression reference:

if(equals(triggerBody()?['Date'],null),'',convertTimeZone(triggerBody()?['Date'],'Dateline Standard Time','Central Standard Time','yyyy-MM-dd'))

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,134)