Formulas

Iron Speed Designer provides a Microsoft Excel-like formula capability for accomplishing many common customization tasks, including:

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.

Formula Examples

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.

Related topics

The Formula Language

Data Validation with Formulas

Dropdown Filtering with Formulas

Common Formula Examples

Cross-site Scripting and SQL Injection Attacks

Formula Run-Time Performance