The labs setup of the Google App Engine powered free online database apps creator, now has support for defining and using expressions for calculated formula fields and in validations.
Update : it is now available at http://creator.ifreetools.com too.
For example, you might have First Name and Last Name as fields within your database record and may prefer to have them combined in another Name field. For this you can add the 3 attributes with data-type as Single line text (String) and for the Name attribute you can set the Formula Expression (under Advanced section of the attributes form) to be
val("First Name") + " " + val("Last Name")
The val function enables you to fetch the value of the field for a given display name.
Note : When adding new formula expressions, you will need to re-index the existing records to have the formula value computed for those entries.
Formula Expressions
You can now define expressions based on values in other fields in the database record to compute the value of formula field.For example, you might have First Name and Last Name as fields within your database record and may prefer to have them combined in another Name field. For this you can add the 3 attributes with data-type as Single line text (String) and for the Name attribute you can set the Formula Expression (under Advanced section of the attributes form) to be
val("First Name") + " " + val("Last Name")
The val function enables you to fetch the value of the field for a given display name.
The formula expressions can be set for any data-types, just make sure the return value of the expression is of the required type.
First_Name+" "+Last_Name
So, if you have a product code field and it should always be 5 characters in length, you can set the Validation Expression as
len(inputValue) == 5
For more details on the operators and functions available for use within expressions, kindly refer to Using Expressions for Formula-fields and Validations, in our user guide.
Aliases for fields
You can also set Aliases for the attributes and use them instead of the val functions, to have the formula to be something likeFirst_Name+" "+Last_Name
Validation Expressions
You can also define validations expressions which need to evaluate to True for the record to be stored into the database.So, if you have a product code field and it should always be 5 characters in length, you can set the Validation Expression as
len(inputValue) == 5
For more details on the operators and functions available for use within expressions, kindly refer to Using Expressions for Formula-fields and Validations, in our user guide.
Hope you like the new feature. Do keep sending in your suggestions on how you believe we can make this app better for you.