Friday, July 29, 2011

Date-Time and Error Functions now available for use within Expressions

Your favorite online database app builder tool over Google App Engine - iFreeTools Creator, now supports date-time functions within formula field expressions and in validation expressions.

The new date-time functions made available are listed below :


now
Usage : now ()
Description : Returns a datetime object having the current time.

date
Usage : date(year, month, day)
Description : Returns a date object for the given year, month and day values.

datetime
Usage : datetime (year, month, day, hours=0, minutes=0, seconds=0)
Description : Returns a datetime object for the given parameters. If hours, minutes and seconds are not provided, they will be taken to be 0 (zero).

timedelta
Usage : timedelta (days=0, seconds=0, microseconds=0)
Description : Returns a timedelta object representing a difference in time, for the given days, seconds and microseconds. Can be used to add or subtract date/datetime values.
Example: now() + timedelta(1) will give tomorrow's date and time.


We have also added support for raising error messages when validating values using expressions. Apart from detailing on how to enter the value for the field in the description, this function will enable you to specify the reason for the validation failing.


error
Usage : error(error_msg)
Description : Raises an error with the given error_msg. This will be shown in the form for the corresponding attribute which failed the validation expression.


We have also rolled in a new home page for iFreeTools Creator, now highlighting the important features available in the platform.



Keep sending in your valuable suggestions on how you think we can make iFreeTools better for you.