Store database values in uppercase

If you want selected text fields to always be stored in uppercase, you can convert the values before they are written to the database.

This example converts the Make and Model fields to uppercase when a record is added or updated.

1. Add the code to the Before record updated event

Open the Edit page: Before record updated event and add the following code.

PHPRunner

ASPRunner.NET

Replace Make and Model with the field names from your own table. Field names are case-sensitive.

2. Add the same code to the Before record added event

Add the same code to the Add page: Before record added event.

This ensures that the selected fields are converted to uppercase both when new records are added and when existing records are edited.

Result

For example, if a user enters:

  • Make: Toyota
  • Model: Camry

the values will be stored in the database as:

  • Make: TOYOTA
  • Model: CAMRY

Applies to

  • PHPRunner
  • ASPRunner.NET

Back to top