Relationship between catalog item and fulfillment groups

hemali1
Kilo Contributor

I am trying to have a list of all the catalog items and the fulfillment groups associated with the workflow on the item. What is the best way to establish such kind of relationsip?

1 ACCEPTED SOLUTION

Here are screenshots of my working database view:



Main Record:


find_real_file.png



Group table:


find_real_file.png



Value table:


find_real_file.png


View solution in original post

12 REPLIES 12

I dont think there is any simple way.



Also sometimes the assignment happens dynamically using script.



So other than generating a report of existing task is one option.And for rest you will have to manually check the assignments.



Please mark this response as correct or helpful if it assisted you with your question.

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

The challenge you will face is that this data is stored in many tables.   Here is an idea that can help... The workflow activities (items within the workflow designer) are stored in the sys_variable_value table.   You can view the list of those records and understand what you are up against.   I did a quick test in my instance and came up with this query:


https://INSTANCE-NAME.service-now.com/sys_variable_value_list.do?sysparm_query=variable.label%3DFulf...



Basically this is a query where the variable label is "Fulfillment group" which matches the label in the catalog task activity and the table is wf_activity.   The value will be the sys_id of the group record.   The ID is a "document id" field meaning its stored in two parts one the sys_id of the workflow that it is tied to and then the table name of the workflow table.   So the list will show you a clickable link however you won't be able to "dot-walk" into it. Hopefully the name showing up in the list will be enough to get you going.



I hope this helps!


Thank you for the above information. This is exactly what I was looking for.



Is there anyway I could get the Group Name instead of sys_id on the same list. I tried using database view for the sys_variable_value table with the above provided query as a where clause and on the sys_user_group table, but that didnt work. Is there any other way I could do it. Should I right a script for it?


I tried database view with the following tables:



find_real_file.png



This didn't give me the list I wanted. Am I going wrong in creating the database view?


Here is what worked in my instance.   Only difference is I put a where clause on the sys_variable_value to only show ones where the variable is "Fulfillment group":


find_real_file.png



find_real_file.png



Then click try it on the view and configure the list to have the columns you need such as ID (from sys_variable_value) and Name (from sys_user_group)