You are here:
Use Case 1: Create a State-Specific Primary Address Flag
This use case creates a flag for customers who live in a specific state.
| Raw Data | Goal |
|---|---|
| The field City State in the format: City, State Abbreviation. For example, San Francisco, CA, or New York, NY. | Create the formula field “Is California” with {TRUE, FALSE} values. Return TRUE if the State Abbreviation is “CA”. |
- For Field Label, enter Is California.
- For Formula Return Type, select Text.
- In the syntax editor, enter the formula: IF(EXTRACT(sourceField['City State'],
",", 1) == "CA", "TRUE", "FALSE").
Use the == operator to check the equality or difference between values on both sides of the operator.
- In the test input box, validate the formula using these combinations.
- “City State” with the value of “San Diego, CA” returns “TRUE”.
- “City State” with the value of “Los Angeles, CA” returns “TRUE”.
- “City State” with the value of “New York, NY” returns “FALSE”.
- Click Save.
- Verify that “Is California” is added as a field.

