June 14, 2021 at 10:49 pm
#6505
Bill Finzer
Keymaster
Hi Travis,
- Create a new attribute stateCode with the formula:
subString(full geo codes
, 2, 2).
This extracts (as a number) the code for the state. - Import into your document a dataset that has each state and its code. Let’s say its name is states_with_codes and that it has attributes code and name.
- Back in the original dataset create a new attribute stateName with the formula:
lookupByKey(“states_with_codes”, “name”, “code”, stateCode) - You’ll probably want to Delete Formula (Keeping Values) for both of these new attributes you’ve created.
You can actually replace step 3 with a join move. Drag the code attribute from your imported dataset on top of stateCode and release. Voilá! You’ve joined the two datasets.
Hope this helps.
Bill