<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000AH777mCQBOkta Identity EngineWorkflowsAnswered2024-10-31T16:50:22.000Z2024-10-16T23:43:18.000Z2024-10-31T16:50:22.000Z

MatT.55012 (Customer) asked a question.

Using a Workflow to add an attribute to a user based on the value of another.

I have an attribute employeeStatus on a user which could be a any one of a number of static values (e.g. A or I or S or T) and then want to update another attribute in Okta with a different value based on the employeeStatus value that corresponds to that static value

for example a user has an employeeStatus of A and I want to add an attribute to the user of employeeStatusLabel with the value of Active based on the A value

can i do something like this in a workflow with a table?

I had a look but couldnt see how to say if employeeStatus = A which is in column 1 of the table, take the value from column 2 of that row and add it to employeeStatusLabel


  • TimL.58332 (Workflows)

    @MatT.55012 (Customer)​ 

     

    It sounds like you want to leverage a Lookup table. They are extremely fast.

     

    imageimage 

     If the A B C D you were talking about is a user input (Not something done by a system but by a user typing it in) I would would add a couple extra steps to normalize the data first. Something like this:

     

    image 

    The "replace" with a regex of /s will get rid of any white space. And the to-lower will make all text characters lower case. So when you evaluate in the lookup table it will always evaluate against a lowercase value (or to upper if you want to do upper case). This way if one person types in (a) and another types in (A) and yet another ( A) etc. They will all end up as (a) when evaluated.

    Expand Post
    Selected as Best
  • TimL.58332 (Workflows)

    @MatT.55012 (Customer)​ 

     

    It sounds like you want to leverage a Lookup table. They are extremely fast.

     

    imageimage 

     If the A B C D you were talking about is a user input (Not something done by a system but by a user typing it in) I would would add a couple extra steps to normalize the data first. Something like this:

     

    image 

    The "replace" with a regex of /s will get rid of any white space. And the to-lower will make all text characters lower case. So when you evaluate in the lookup table it will always evaluate against a lowercase value (or to upper if you want to do upper case). This way if one person types in (a) and another types in (A) and yet another ( A) etc. They will all end up as (a) when evaluated.

    Expand Post
    Selected as Best
  • MatT.55012 (Customer)

    Thanks Tim. Yeah i think that is what I am after. I will give this a go and let you know.

    Cheers.

This question is closed.
Loading
Using a Workflow to add an attribute to a user based on the value of another.