Catalog Task, variable change value not captured in workflow

Tadz
Tera Guru
Tera Guru

Hi, I have some problem with Catalog Task.

I have a variable test from a catalog item where I passed it to the catalog task.

When I changed the value of test, it reflects in the requested item that it has been changed.

But in the workflow, I doesn't capture the change of value.

The workflow only accepts the change when you change the test value from the requested item.

Is there a better way to implement this or any suggestions.

Thanks,

Tadz

6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Cris,



Any changes in the value on requested item will be pulled as the workflow runs on table "sc_req_item".


Please let me know if you have any questions.


vijivt
Mega Expert

Hi Cris,



A variable's scope determines its availability to a catalog task activity within a workflow. You can define variables as global or catalog item-specific. When a variable is associated to a catalog item and the workflow generating the catalog task is associated to the catalog item, the variable scope determines which variables are available for mapping within the catalog task activity in a workflow. If a workflow is associated with Requested Item [sc_request_item], and is not specifically associated with a catalog item, any catalog variable with a blank Cat Item field value is available to all catalog task activities within the workflow.



You can read more on using variables in a workflow here : http://wiki.servicenow.com/index.php?title=Using_Variables_in_a_Workflow#Scope


Hi Viji,


I know this thread is already old but I have some question.


When we say You can declare requested item catalog variables at the catalog item level or at a global level.



In my understanding:


Variable in catalog item level - any changes in requested item will, can affect the workflow


                                                                                          - changes of variables from the catalog task would not reflect the workflow.


                                                                                                  (Note: Variables in the catalog task are same in the requested item)



Variable in global level - any changes in requested item or catalog task variables will reflect in the workflow.



Is this right?



Thanks,


Tadz


Hi Cris,


Sorry for the late reply.....



Variable in catalog item level - any changes in requested item will, can affect the workflow   -yes if the worklfow is running on sc_req_item ( Requested item) table and the workflow is associated to the catalog item


find_real_file.png


            - changes of variables from the catalog task would not reflect the workflow.


                      (Note: Variables in the catalog task are same in the requested item) - this will still work...if you change some values on the catalog task the variable values on requested item changes...Attach the variables on the catalog task workflow activity to view them on the catalog task form.



find_real_file.png



We can make the variables global for eg. if there are some information required to be passed from one catalog task to the other and these tasks are executed by different groups.



Were you able to solve your problem? Can you provide more screenshots of the problem?