Filter variable in a variable set based on variable present in the item

Chirag Pathak
Tera Contributor

Hi Community,

 

I have an item which has variable called manager based on the manager selected by the user only the assignments (like a number on the same table where manager is also present) related to the particular manager should be shown up in the assignments which is a variable in the variable set and one manager can have many assignments but that isnt the case vice versa. Any help?

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

If your variable set is a single-row, the reference qualifier is the same as it would be outside of the variable set.  If it is a multi-row variable set that needs a variable in the parent / catalog item, here's an article that shows you how to do that

https://www.servicenow.com/community/now-platform-articles/yes-you-can-effectively-set-or-update-a-r... 

View solution in original post

4 REPLIES 4

Brian Sorensen
Giga Guru

Want to see if I understand this right

Lets say you have Jim and Bob as Managers.

Jim has Assignments A,B,D,G,H
Bob has C,E,F,I

You want a drop down that shows select manager
Jim or Bob
Then a drop down with Assignments

Jim would only show -A,B,D,G,H 

?

 

 

So Jim and bob options would come from users table which is already referenced in the variable manager in the item the manager variable is not a part of the variable set. Now in variable set I have a variable called assignments. When the user selects in Jim in the manager the assignments variable should be filtered out based on the manager name and show me options of A,B,D,G,H.

Brad Bowman
Kilo Patron
Kilo Patron

If your variable set is a single-row, the reference qualifier is the same as it would be outside of the variable set.  If it is a multi-row variable set that needs a variable in the parent / catalog item, here's an article that shows you how to do that

https://www.servicenow.com/community/now-platform-articles/yes-you-can-effectively-set-or-update-a-r... 

Yes it is a multi row variable set so looks like creating a script include is the way to do it. Thanks!