Need a transform that will set the Identity attribute of office to value from other identity attribute based on employee type

Need a transform that will set the Identity attribute of office to value from other identity attribute based on employee type where they are contractlabor or student. Want to set the office to facility they will be at

:bangbang: Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.

Please consider addressing the following when creating your topic:

  • What have you tried?
  • What errors did you face (share screenshots)?
  • Share the details of your efforts (code / search query, workflow json etc.)?
  • What is the result you are getting and what were you expecting?

Hi @dpowers1 , the value from other identity attribute can be retrieved using the “Reference” operation - Reference | SailPoint Developer Community

What have you tried so far?

1 Like

I have tried this and get error on the field when i do a preview

{
  "name": "SetIdentityAttributeForSpecificEmployeeTypes",
  "type": "conditional",
  "attributes": {
    "test": {
      "type": "contains",
      "attributes": {
        "values": ["ContractLabor", "Student", "Intern", "Temp"],
        "value": {
          "type": "sourceAttribute",
          "attributes": {
            "name": "employeeType"
          }
        }
      }
    },
    "then": {
      "type": "sourceAttribute",
      "attributes": {
        "name": "fieldName"
      }
    },
    "else": {
      "type": "static",
      "attributes": {
        "value": ""
      }
    }
  }
}

The mentioned Reference operation is for referencing another transform, not another Identity Attribute, so it will not work in this case.

I would consider looking at the Identity Attribute Transform for the sourceAttribute:
SEE NOTE BELOW. No Longer Recommend.

Also, what is the error that you are getting?

1 Like

It should also be noted that the Identity Attribute transform is not recommended when it can be avoided; if possible, you should use the Account Attribute transform instead (or the Reference primitive to reference another transform). Using the Identity Attribute transform can result in attribute values not updating in a timely manner as Identity Attribute values may not calculate in the correct order, resulting in the transform being calculated before the referenced Identity Attribute has been updated.

See the warning on the linked transform documentation:

This transform is not intended for use within an another identity profile attribute’s calculation. Identity attribute calculations are multi-threaded processes, and there is no guarantee that a specific attribute has current data, or even exists, at the time of calculation within any given transform. Referencing identity attributes within another identity attribute’s calculation can lead to identity exceptions.

2 Likes

Good catch. I looked right past that note.

Thank you for that information. It actually helped me fix another transform I was having trouble with.

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