Display null or empty value in email


Badge +8

Hi, 

See below email content.

Basically Planned End date is null from my DB, I want to display as null as this field is not mandatory.

But the email in my workflow task is displaying "1/1/00*personal details removed*:00:00 AM", how to validate or workaround?

 

Description: test no end date
Planned Start: 20*personal details removed*T00:00:00
Planned End: 1/1/00*personal details removed*:00:00 AM
Request Type: CLIR
Remarks:
 

 

Thanks

Dabuskol


2 replies

Good day 


 


This behaviour is correct by design and can be explained as follows:


 


The Date/Time value is submitted in the Calendar Control with the User’s Time Zone value (e.g UTC+5). The K2 server then converts the Value to Server Time Zone before saving it to a SmartObject (e.g. UTC). When this value is retrieved by a user in a different region, their Time Zone offset is again applied to the value (e.g UTC-5). This will result in a date possibly being displayed differently from how it was saved by the original user.


 


This is expected behaviour. To stop the time zone conversions from being applied, the following Rule can be added to set the Control to always use a specific time zone, irrespective of a User's local time zone:


When the View executed Initialized, then set the properties of [Calendar control]. In the rule (configure), set the “Display Time Zone” to the preferred value (e.g UTC).


 


Please check the KB article:


http://help.k2.com/support-services/kbt135043


 


K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member


 


regards


Thabiso

Badge +4

Hi Dabuskol,

 

if you use the DateTime data field then it picks up the default value if it is empty.

 

you can try this. Use string data field to store value and in the email use an expression to check if a field contains value then convert to specified date format or else leave that as an empty string.

 

Thanks,

Vijay

Reply