Automatic Field Calculations allows you to test values. This important task is carried out by the If function. It is similar to the If function in Excel. Here is its syntax: value_if_true is the placeholder for the value that will be written to the target field if the logical test is passed, value_if_false if it is not passed.
In the example shown below, we are testing the value of FieldA. If it is California, then we write Local to the target field, else we write Interstate.
When testing for an empty field, use ="" (equals empty) or <>"" (different than empty) as shown here:
If you want nothing to happen if the condition is false, just skip the last argument:
If you want nothing to happen if the condition is true, just skip the middle argument: