Look at the Time

A big thing to watch out for when you’re building an application in K2 blackpearl with an RDBMS back end is an understanding of how to treat datetime values.

K2 uses the value scnull to indicate a NULL value. This becomes especially important in SmartObject calls down to, say, stored procedures in your database.

The problem is, you can’t pass a value of scnull into, say, a workflow datafield that’s expecting a datetime value. For that, you have to use an actual datetime value like 1/1/1900.

All of this manipulation can make things pretty hairy when you’re trying to feed a SmartObject and start a workflow at the same time. If your datetime value is on a SmartForm, and you anticipate having to deal with blank or NULL values, you might consider adding a hidden data label or two and expressions to go along with them. That way, you can convert the calendar control value into something useful for the database in one data label, and something useful for data fields in another.

Look at the Time

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s