Where is this sys_id coming from for this DYNAMIC query (for assignment group)

Armin Heinlein1
Giga Expert

I want to separate groups that handle Incidents so that the ITIL user in each groups only see their incidents. I didn't want to play with the ACL so I updated the business rule "incident query " (see below). The business rule is working after some initial tests and showing me only the incidents for the groups the user is in.

However, I am wondering where is the sys_id ("d6435e965f510100a9ad2572f2b47744") for this DYNAMIC coming from? I copied that query from the list when I set the filter.   The value is the same as on my developer instance, test instance and production instance.

--------

Business rule: incident query

When: before

Order: 100

Query

No filter

----------------

// check if user is not the admin. admin can see everything

if (!gs.hasRole("admin")) {

        var u = gs.getUserID();

        // if user has ITIL role we check what groups the user belongs to and then run the query

        if (gs.hasRole("itil") && gs.isInteractive()) {

                  var qc = current.addQuery("assignment_group", "DYNAMIC", "d6435e965f510100a9ad2572f2b47744");

                  gs.print("query restricted to users groups: " + u);

        }

        // if user is not itil we check only for the incidents for the user

        if (!gs.hasRole("itil") && gs.isInteractive()) {

                  var qc = current.addQuery("caller_id", u).addOrCondition("opened_by", u).addOrCondition("watch_list", "CONTAINS", u);

                  gs.print("query restricted to user: " + u);

        }

}

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Dynamic filter i gguess,



Navigate to Dynamic filter from left nav


-Anurag

View solution in original post

8 REPLIES 8

Anurag Tripathi
Mega Patron
Mega Patron

Dynamic filter i gguess,



Navigate to Dynamic filter from left nav


-Anurag

I am not sure I understand what you are trying got say? I got the value when I copy the query from the list into the script. I would like to find out to what table that sys_id is refering to.


It should be a group, sys_user_group


-Anurag

The user can be in many groups and I found it.


It is in the table "sys_filter_option_dynamic".