can we make any variable visible on sctasks by creating it on catalog form page as variable.

mishrarakes
Tera Contributor

I have a requirement of show a variable on SCTASK by creating it on catalog form page and make it invisible in catalog form and make it visible only on SCTASK only. I have created variable on catalog form and then with UI Policy made it invisible from catalog form and with another UI policy made it visible to RITM and SCTASK but it does not visible on SCTASK but visible on RITM and invisible in Catalog form,   variable editor is already in right side for SCTASK.  can some one help please..

10 REPLIES 10

Hello @GopikaP , actually, at first I have tried to achieve this using flow but in flow triggers-> table  I did not get sc_req_item , I asked on community, and I got an answer that we can not trigger flow on sc_req_item table by default , which made me to create this using Business Rule.

We don't have sc_req_item trigger, but we have 'Service Catalog'. You can choose that,1.png

and then you can map the same flow under your catalog item -

2.png

 

Please Refer : Solved: How to generate catalog task once RITM is submitte... - ServiceNow Community

Here I have attached some screenshots , first I had tried using flow only, but then it did not work out.

Hi @mishrarakes , I understand why you're not using Flow, but I still recommend using it, as it's considered best practice in this situation.

But, anyways, I have managed to show/hide variables in catalog task without using flow designer - 

Please refer - How to show variables/variable editor on the catalog task - Support and Troubleshooting 

Just keep in mind that you'll need the UI Policies I shared earlier to keep that specific variable hidden on the RITM form.

I created the catalog task using a business rule and was able to display that variable in the catalog task, but not in the RITM.

Feel free to reach out if you get stuck.

Nishant8
Giga Sage

Hello @mishrarakes, can you please verify whether any other UI policy isn't hiding this variable on SC task especially UI policy that you have written to hide it on catalog item view - ensure this policy isn't applied on Catalog Tasks? you can enable the UI policy debugging and can figure this out.

 

Regards,

Nishant