Jump to content

Recommended Posts

Posted

Hi

I adding in a custom field into an email template. I found out in the link below on how to make it not visible if empty which is great.

I also need to know how to format it as well as it's a date custom field, I can seem to get |formatLocalTime to work using  {{.H_custom_21|formatLocalTime }}

 

Can anyone point me in the right direction?

 

 

Posted

 2022-06-27 09:45:00Z

It's the Z on the end that it won't get rid of.

 

Both the regional settings are configured

Posted

Hi @Cassie

Try setting the system.regionalSettings.timeZone as well.  I'm not sure what affect this may have but you also seem to have a space within your variable at the end, after formatLocalTime.   {{.H_custom_21|formatLocalTime }}

Posted

@James Ainsworth
So I have the time format field now working after changing that last setting.

I have the hide if empty field working.

But I can't seem to use them both together. Is this the correct esp condition?

Thanks

Cassie

Hornbillcustomfield.jpg

Posted

@Cassie the expression you have there is for when the variable would have string values. You are using a date there. Change the expression to:

'{{.H_custom_21}}' IS NOT NULL

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...