How to make variable visible only on specified task

Sai Akhil
Tera Contributor

Hello All,

I have a requirement where a particular variable should only be visible on the particular task for suppose after the submission of the catalog item A task is generated once the state of task A is completed task B is generated where I need to show the variable on this task only, how can we solve this please help me..

Thanks,

Akhil.

1 ACCEPTED SOLUTION

Kajal Goti
Mega Guru

Hi,

 

You can configure specified variable on workflow activity where you create task

Please see below snap for the reference

 

find_real_file.png

 

Open task activity where you can add the variables which you want to display on task form

find_real_file.png

Please mark as correct/helpful, If you find any help

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Sai Akhil 

You will have to create onLoad Catalog Client Script which Applies on Catalog Task

Also you should be knowing what is the unique short description for each task Task A, Task B

function onLoad(){

if(g_form.getValue('short_description').indexOf('Task B Short Description') < 0){

// it is not task B so hide it

g_form.setDisplay('variableName', false)

}

}

Regards
Ankur

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

Kajal Goti
Mega Guru

Hi,

 

You can configure specified variable on workflow activity where you create task

Please see below snap for the reference

 

find_real_file.png

 

Open task activity where you can add the variables which you want to display on task form

find_real_file.png

Please mark as correct/helpful, If you find any help

Ankur Bawiskar
Tera Patron
Tera Patron

@Sai Akhil 

Please avoid duplicate question

Please delete your below question

https://community.servicenow.com/community?id=community_question&sys_id=7ffe52d5dbdea410fa192183ca96...

Regards
Ankur

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