Iron Speed Designer provides a Microsoft Excel-like formula capability for accomplishing many common customization tasks, including:
Display a calculated field. For example, Unit Price * Quantity.
Display a running total.
Assign a value to a data-bound control based on a formula.
Initialize a textbox or a literal to a value from a URL, Session, Cookie or another field.
Perform common mathematical functions including mean, median and mode on any data set.
Customize the query of any dropdown list.
Display multiple Display Foreign Key As fields.
Use a formula in a WHERE clause of a query.
Look up values in other database tables and display one or more fields.
Save data into a session variable or cookie.
Filter dropdown lists.
Initialize filter dropdown list by URL, Session or another value.
Access field or filter control from parent records.
Access default values for a database record.
Specify constants.
An impressive array of built-in functions and operators provide the underlying power and flexibility to implement most customizations.
Formulas are generally available in the Formulas tab and in the Query Wizard. The Formulas tab allows formulas and database queries to be specified for different events. For example, a textbox control can display an initial value for new records and an existing database value when editing a record.
A few examples will give you a sense of what can be accomplished with formulas.
Last Name |
= CAPITALIZE(SUBSTRING(USERNAME(), 2)) If the logged in user name is First Initial Last Name, strip the first initial with the SubString function, and Capitalize the resulting string. |
First Name |
= IF(USERNAME() = “lskywalker”, “Luke”, “Anakin”) Use an IF function to determine the name of the currently logged in user, and initialize the first name value based on the logged in user name. |
Title |
= RESOURCE("Txt:Other") Get a resource string for the current culture. |
Address |
= “2870 Zanker Road" A specific string value. |
Email Address |
= USERRECORD("EmailAddress") Retrieve the value of the EmailAddress field from the database record of the currently logged in user. |
City |
= “San Jose” A specific string value. |
Hire Date |
= TODAY() Today’s date. Time is specified as 12:00:00 AM. Use NOW() to retrieve today’s date and current time. |
Birth Date |
= TODAY().ADDYEARS(-25) Twenty five years ago. Note the usage of additional functions (AddYears) from the Microsoft .NET DateTime object class. |
Notes |
= "<i>Please enter something descriptive about this employee</i>" A specific string value containing HTML formatting code. |
Here’s the resulting Add Record page showing how each of these formulas sets an initial value for their respecitve fields.
Dropdown Filtering with Formulas
Cross-site Scripting and SQL Injection Attacks