way to remove value in special instuctions data in the sc task after state is complete

raj765_32
Tera Contributor

hi can anyone help me with scenario for 

when i submit a catalog item there are three sc tasks in where i have written a code in 2 and 3 rd sc task to display some value in special instructions field.

 

What happening is that after i close complete 1 st sc task, the data/value written in  2 and 3 sc task is getting displayed when 1 st sc task is closed complete. 
please help me how to fix this and where to fix this in which sc task.

below is the code :
i have written this code in workflow 2nd and 3rd catalog task activity

var gr = new GlideRecord('sc_request');
gr.addQuery('sys_id', current.request);
gr.query();
 
if(gr.next())
{
gr.special_instructions = "1. Complete template to request EP End User Access form Blue Yonder. \n\n2. Submit request (Medium priority) via Blue Yonder portal. 
gr.update();
}

my requirment is that it should not display in 1 st sc task when the task is completed or what ever state it should display in 2 and 3 sc task only
4 REPLIES 4

Swamy Malluri
Tera Guru
Tera Guru

Hi @raj765_32 ,

 

Could you elaborate your requirement, are you trying to update instruction in request or do you want to pass the instructions to 2nd and 3rd tasks only ?

 

Regards,

Swamy

after submiiting a ritm there is a first sc task 

what happening is that after i complete first sc task only im getting value in special instructions field, which i dont want to get

i have to get the value of special instructions in 2 and 3 rd sc task only

Hi @raj765_32 ,

 

If you want to give static instructions to 2nd and 3rd task, then you can provide instructions in activity/Action while creating the tasks in workflow or flow.

If 1st sc task providing the instructions and you want to pass to 2nd and 3rd then, try below work around

1.Create one hidden variable on Catalog form. 

2. Hide that variable on RITM and 1st SC taks.

3. Update the instructions variable value when 1st task is completed.

4. Capy the variable value into 2nd and 3rd task in workflow/flow. Or you can copy the values to 2nd and 3rd task description through script  task activity.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

Thank you

no this is not working and im not passing any value from 1 st sc task, 

I just want to remove the value in 1 st s task in what ever state is ,