Is there a way to do one - one mapping of values from attribute1 to attribute2 in NERM?

We have an attribute1 with multiple values and want to do one - one map of each value from attribute1 to attribute2.

example:
Attrbute1 <> Attribute2
Option1 <> Option1
Option2 <> Option2

Hi Anshuk, Thanks for posting this question!

Short answer: No, NERM does not have a quick mapping / matching feature that would set the option of one Attribute based on the option of another, automatically.

Couple of follow ups:

  1. Are the Option values the same or different?
  2. Is the intended use case that a User would pick the value for Attribute1 and then the correct value from Attribute2 is auto-populated?

If the answer to 1 is “different” and to 2 is “yes”, I can think of three implementation strategies:

  1. The long, static approach: Conditions. In a workflow, utilize Conditions to check the value of Attribute1 and use Set Attribute Values actions to set the value of Attribute2. Depending on the number of options that you have, this could be easily managed, or very long as each option for Attribute1 would need its own Condition.

  2. Use a REST API Action. Basically the same as above, but Liquid in a REST API action could perform the same Condition checking of Attribute1 and set the value of Attribute2 - all in one action. This could be a PATCH to the Profile or Workflow Session and the JSON body would look like the below (Assuming this is a PATCH to the Profile):

{
    "profile":{
        "attributes": {
            {%if attribute.attribute1 == "Value1" %}"attribute2":"Value1"{%endif%}
            {%if attribute.attribute1 == "Value2" %}"attribute2":"Value2"{%endif%}
            {%if attribute.attribute1 == "Value3" %}"attribute2":"Value3"{%endif%}
        }
    }
}
  1. Depending on the data in use here, you could use Profiles to handle this data, instead of just attributes. So, for example, lets say your two attributes were “Department” and “Location”. So, for “DepartmentA” you want to set “LocationA”, etc. Instead, you could create a Departments Profile Type and on each Department profile, set a “Location” attribute.

That way, in a Workflow, a User can select the Department and then using a Set Attribute Values action, pull out the Location value. The Set Attribute Values action would like sort of like this:

Thankyou Zachary. The solution worked for me.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.