We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

WorkFlow - When Group Owner changes, find Department Name of New Owner

slwbid
Tera Contributor

I have a workflow started.  Got the trigger down pat:

1- Group updated where Owner Changes

Then I need to:

2- Look up the department name of the new owner

3 - Set Group.Parent = NewOwner.Dept.Name

 

I have tried, but been unsuccessful for steps 2 and 3.

 

Any help appreciated

GhostRider

 

Note: I have already created the necessary Parent Groups and are named verbatim like the relevant Department names

 

4 REPLIES 4

Brad Bowman
Kilo Patron

It would help to show your attempt.  It sounds like you can use a Lookup Record activity to lookup the user from the trigger group manager or whatever field. That will be a sys_id, so the the lookup on sys_user is where sys_id = the data pill.  Then you need to do another Lookup Record to lookup the group record that matches the Name of the department data pill from the user lookup so that you can then do an Update Record on the trigger record to set parent = that lookup, since it has to be a sys_id.

Yes, of course. Reference Attached Screen shots.

I was/am trying to follow the 3 steps shown in the left top of screen shot. 

I think I have the initial Trigger ok, as shown in Right Top

But then I don't know how to insert the last part of the step #2 action - see bottom middl

 How exactly does one implement the #2 Action?

 

Very Respectfully and thankful for any help.

slwbid
Tera Contributor

I have been having issues posting replies.  I surely hope this reply does not post twice.

Thanks Brad.  See Attached Screen shot

I am trying to follow the 3 steps listed.

I think I have step 1 correct for the Trigger, but then in trying to do last part of Step 2 (highlighted in pink) - Frankly, I don't know how.

How exactly does one put "sys user table where sys_id is Trigger -> Group Record -> Manager

 

Thanks for any help

Sunil B N
ServiceNow Employee

Hi GhostRider

You can add a condition get sys user where sys_id is equal to new owner based on the changed fields.
then in the next step update group record parent value to user's department

Let me know if you are struck anywhere.