Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Issue in flow design

ChittemVeer
Giga Contributor

Hi All,

 

I have created a field in a Catalog Item and configured a UI Policy so that the field is visible only on the Catalog Task (sc_task) form and not on the RITM or REQ forms.

My requirement is that when a user selects a value in this field on the Catalog Task, another Catalog Task should be created automatically based on the selected choice value.

However, I am facing an issue where I am unable to fetch the field value in Flow Designer. Since the field is available on the Catalog Task, I would like to know the best approach to access this field value in the flow and use it to create another task.

Could you please suggest how to fetch the Catalog Task field value in Flow Designer and use it in a condition for creating a subsequent task?

 

Thanks and Regards,
Veeresh

10 REPLIES 10

Rafael Batistot
Kilo Patron

Hi @ChittemVeer 

 

Use Get Catalog Variables in Flow Designer to retrieve the variable from the RITM associated with the Catalog Task.

Then use that value in an If/Else condition to determine which subsequent Catalog Task should be created.

The fact that the variable is visible only on sc_task doesn’t change where the Catalog Variable is stored, it remains associated with the RITM.

 

https://www.servicenow.com/docs/r/build-workflows/workflow-studio/get-cat-variables-flow-designer.ht...

 

If this response was helpful, please mark it as Helpful and, if applicable, as Correct.
This helps other users find accurate and useful information more easily

Hi Rafael Batistot

 

Thanks for the response, I used get catalog variable to retrieve all the variable from Available to Selected list box, but still when I select the respective option in the sc_task and save after refresh the option automatically getting cleared, because of the whatever the if condition I written in flow design it's not able to compare because it getting empty value after the refresh.

Hi,

Can you retreive variables OR use get catalog variable action two times. One before line 43 and store the value in flow variables and another after the catalog is created so that we can get the previous variables and latest changed variables and then compare both the variables and then create another task.

If this did not work that means we cannot get the changed variables then I would rather use Before BR on sc_task to check the changed variables and create another task.

Hi,

Thanks for the response, it's a catalog variable that I created and the requirement is there is a variable called pc type it has two options which is secondary pc and cloud pc this particular variable should only visible in sc_task, there if the user selects the pc type example secondary pc it should create create a another sc_task. but this is not triggering correct through the flow design 

 

if you observe attached screenshot, till line 43 it trigger correctly when we select pc type value in line 43, immediately it will check the condition and it should move the next create catalog task from line 44 it is not working.