Iron Speed Designer Help
 

Validate Related Textbox Fields and Display Custom Error Message

Many times, your application will need to validate related fields, for example to:

  • Validate related fields where values must be specified in one field or the other.

  • Validate dependent fields where the value of one field is dependent on the value of another field.

This validation formula for the “Validate when Saving record” event returns an error if the City field contains San Francisco and the Country field is anything other than USA.

= IF(CustomersRecordControl.City.Text = "San Francisco" AND CustomersRecordControl.Country.text <> "USA", "Conflicting choices for City and Country", "")

If the condition evaluates to true then an empty string (““) is returned, indicating the validation is successful and the record should be saved into the database.