How to use newvalue and oldvalue in Identity Attribute Change workflow

Hi All,

I have a use case where i need to send the email to the manager when Env identity attribute change.

  1. When Env change from “Test” to “Dev” and “Dev” to “Test”.
  2. I wan to send the mail to their manager using workflow
  3. Also i want to check oldValue and newValue
    For example:
    a. If users oldvalue is “Test’ and newValue is “Dev” email should send
    b. If users oldvalue is “Dev” and newValue is “Test” email should send
    c. If users oldValue is “QA” and newValue is “Test/Dev” don’t need to send the mail
    d. If users oldValue is 'Test/Dev” and newValue is “QA” don’t need to send the mail

I have tried the workflow in this way:
Identity Attribute Change > Get Identity > Comparison Operator > Get manager Email using Http Request > Send Email

Comparison operator values:

Any idea how to achieve this? Will helps a lot to me…

Thanks,
Shantha Kumar

At present, conditional operators are not supported in IdentityNow workflow. Therefore, we must add multiple compare string blocks.

In Compare String: Please use multiple comparators.

Comparator 1:

Value:1
$.trigger.changes[?(@.attribute == "Env")].newValue

Value:2
Test

If Comparator 1 is true: Add Comparator 1.1:

Value:1
$.trigger.changes[?(@.attribute == "Env")].oldValue

Value:2
Dev

If Comparator 1 is false: Add Comparator 1.2:

Value:1
$.trigger.changes[?(@.attribute == "Env")].newValue

Value:2
Dev

If Comparator 2 is true: Send email to manager test to dev

If Comparator 2 is false: Add comparator 2.1

Value:1
$.trigger.changes[?(@.attribute == "Env")].newValue

Value:2
QA

and goes on…! I know not an idle solution, unfortunately, operators are not supported. Please refer to the below for an update on ISC :

Thanks @anneragh will try this and let you know

1 Like

Were you able to solve it?

I have used multiple comparision operators and it works

can you share the JSON

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