Auto Populate



I would like to be able to fill in a field with a value base on what is entered into another field. For example

When a name is selected in a pull-down box of sales people I would like it to automatically populate the location field based on who is filling out the form.

So.....If "sales person" is John Smith then "location" would automatically be "Kings Mountain"

I'm thinking something like...

if (submitted_by.rawValue == John Smith)

plant.rawValue = "Kings Mountain";

I can use the routine in several different locations.