The source field has a picklist of values on it. But critically, the values in this field may not all match valid picklist values. For example:
Field_A__c picklist: Hamburger picklist: Hotdog
I want a proposed Field_B__c field to have a value based on the values in Field_A__c. So if Field_A__c's value is 'Hamburger', then Field_B__c's value should be 'Beef'. That sounds pretty simple, right?
My issue is what happens when Field_A__c has a value of 'Pizza'. But 'Pizza' is not one of those picklist values I noted above. How do I update Field_B__c's value in this scenario?
More Info
- The current number of unique Field_A values is 10. This is specifically the amount of picklist items available to choose.
- The current number of unique Field_B values is 5.
- Some values of Field_A are not in the picklist values because the Restrict picklist... option is unchecked on the field & new "non-picklist" values could still be added.
I think this chart should help visualize what I want?
Field_A | In Picklist | Field_B |
---|---|---|
Pizza | TRUE | Dinner |
Hamburger | TRUE | Dinner |
Eggs | TRUE | Breakfast |
Salad | TRUE | Dinner |
Tuna Sandwich | TRUE | Lunch |
Ice Cream | TRUE | Dessert |
Toast | TRUE | Breakfast |
Steak | TRUE | Dinner |
Potato Chips | TRUE | Lunch |
Tacos | TRUE | Dinner |
Cake | FALSE | Dessert |
Bacon | FALSE | Breakfast |
Water | FALSE | Other |
Field_A
values? (2) UniqueField_B
values? (3) Are some values ofField_A
not in the picklist values because A) it is "old" data (e.g., from before the field became a picklist field, "retired" picklist values, bulk data load)? Or B) because the Restrict picklist... option is unchecked on the field & new "non-picklist" values could still be added? (Or create a "C)" if something else.)Field_A
picklist values to match up to the 5Field_B
values, and then everything else NOT in theField_A
picklist get lumped into one value inField_B
. You have added layers of complexity to want theField_A
non-picklist values to then be parsed and matched with specificField_B
values....