Catalog SCTASK

Bheemaraju Vagu
Tera Expert

Hi Community Family😍

Trying to solve below scenario.

How can I hide one particular variable in one of the catalog task but should not be visible on next task.

E.g. RITM request is submitted and Task 1 is active. Variable 'A' which should be visible on Task 1 and once Task 1 is completed, flow will generate second catalog task Task 2. Variable 'A' should not be visible on Task 2. And should be visible on TASK3.

What are the options here, please suggest.

Note: I have tried UI policy where I can handle only one Task but visibility for another I can't handle. Looking for some generic approach.

Thank You

2 ACCEPTED SOLUTIONS

@Bheemaraju Vagu 

you said in your question you don't want to show it in Task 2 then why to add that variable in Flow Designer create catalog task action?

You want to show in Task 3 then add it there

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hi @Bheemaraju Vagu 

If the Email field is displaying in all the catalog tasks, let's double-check the Global checkbox in the Email variable.

 

"Is there any client script is available ? like that email field should be available only for a  particular assignment group then the issue would resolve."

I'm not sure your use case is to apply this On Load only or On Change the assignment group field.

If it just need to execute On Load, you can refer to the below approach.

1. Create On Load Catalog Client Script.

2. Check the checkbox Applies on Catalog Tasks.

3. Do the validation on the assignment group and set display accordingly.

Sample below.

function onLoad() {
	if(g_form.getValue('assignment_group') !== '<the_sys_id_of_group>'){ //replace your assignment group sys_id
		g_form.setDisplay('email', false); //replace your variable name
	}
}

 

The script above is hard-coding. If you don't want to do that, you can define a system property and do an AJAX call to do the validation.

 

Cheers,

Tai Vu

View solution in original post

14 REPLIES 14

Bheemaraju Vagu
Tera Expert

@Ankur Bawiskar  

Could you please provide me the solution

Ankur Bawiskar
Tera Patron
Tera Patron

@Bheemaraju Vagu 

If you know which variable to show/hide then why to include that variable in 2nd catalog task in the flow designer?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Once filling the details in TASK1 after closing that that Task, the field should available in Task 2 that is scenario. 

@Bheemaraju Vagu 

you said in your question you don't want to show it in Task 2 then why to add that variable in Flow Designer create catalog task action?

You want to show in Task 3 then add it there

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Bheemaraju Vagu 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader