How to Check if the assigned to on incident form is different from updated by in flow designer

Arundhati
Tera Contributor

Hello Team,

I have a requirement where I need to compare the values of assigned to and updated by in an flow designer can you please help me with this query?

 

Regards,

Arundhati

1 ACCEPTED SOLUTION

Aniket1498
Giga Guru

Hi @Arundhati ,

In the Updated by field, mostly you might have observed something like this:

Aniket1498_1-1741860658330.png

 

Please note that the Updated By field is a string field and it stores a the User ID of the user who updated it.
In the flow, you just need to check the Assigned to (Reference) field's User ID with the Updated By field and your requirement will be fulfilled.

Please mark my response helpful if it solves your requirement.


Warm Regards,
Aniket

 

 

View solution in original post

4 REPLIES 4

KKM
Tera Guru

Hi Arundhati,

 

 

In Flow Designer, you can compare the values of "Assigned To" and "Updated By" using a Condition step. Here’s how you can do it:

Steps to Compare "Assigned To" and "Updated By" in Flow Designer:

  1. Get the Record:

    • If you are working with an incident, task, or any other table, ensure you have the record data available in the flow.
    • Use the Trigger Record or Lookup Record action to retrieve the record.
  2. Add a Condition:

    • Use an If condition or Wait for Condition step.
    • Compare the Assigned To and Updated By fields.
  3. Condition Configuration:

    • Select Assigned To (Field: assigned_to)
    • Select Updated By (Field: sys_updated_by)
    • Use "is not equal to" or "is equal to" based on your requirement.

    Example condition:

    css
    CopyEdit
    [Assigned To] [is not] [Updated By]
  4. Handle the Condition Outcome:

    • If true, take the necessary action (e.g., send an email, update a field, trigger another action).
    • If false, continue or stop the flow.

Alternative: Use a Script Action (If Needed)

If you need a more complex comparison, you can add a Script Action in Flow Designer:

 

javascript
CopyEdit
(function execute(inputs, outputs) { var task = new GlideRecord('task'); // Change table if needed if (task.get(inputs.record_sys_id)) { outputs.isDifferent = task.assigned_to != task.sys_updated_by; } })(inputs, outputs);
 
  • This script returns true if the Assigned To and Updated By fields are different.

Would you like help implementing this in your specific flow?

Kindly mark it as correct/helpful, it it resolves your query. Please press like button for the resolution provided.

Regards,
Krishna Kumar M - Talk with AIT3ch
LinkedIn: https://www.linkedin.com/in/mkrishnak4/
YouTube: https://www.youtube.com/@KrishAIT3CH
Topmate: https://topmate.io/mkrishnak4 [ Connect for 1-1 Session]

GopikaP
Mega Sage

Hi @Arundhati , you can add an if condition and compare both fields - SC1.pngSC2.png

Ehab Pilloor
Mega Sage

Hi @Arundhati,

 

You can compare in IF condition where Assigned to will be Field, IS is the Operator and Value will be Updated by datapil and set the action after it. 

 

Regards,

Ehab

Aniket1498
Giga Guru

Hi @Arundhati ,

In the Updated by field, mostly you might have observed something like this:

Aniket1498_1-1741860658330.png

 

Please note that the Updated By field is a string field and it stores a the User ID of the user who updated it.
In the flow, you just need to check the Assigned to (Reference) field's User ID with the Updated By field and your requirement will be fulfilled.

Please mark my response helpful if it solves your requirement.


Warm Regards,
Aniket