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

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

Sirri
Tera Guru

Hi @Bheemaraju Vagu,

 

Let me know your using workflow or flow designer for creation of catalog tasks.

If you your using workflow, In task 2 variables you can in that variables below you can make that specific variable not visible in catalog task. for your reference please find the screenshot. 

let me know still your not getting.

 

Hi siri

I'm Using Floe Designer

Hi @Bheemaraju Vagu ,

could you send the variables of second catalog task , first catalog task and 3 catalog task. with value in that variables.

I have a requirement like

1. I have to create a field as "Enter your email" on SCTAST1 After fill the details the assigned person close the task.

2. After that new task would be generated eg.TASK2 then, after closing the task2 another task3 would be generated.

3. Now in TASK3 we need get that Email field with value also and that should be non-editable then after checking that email correct or not then close the Task3 Also