when i change the task to Closed skipped state but it s getting updated as closed incompleted

BanuMahalakshmi
Tera Contributor

Hi,

 

I was trying to change the SCtask state value to "closed skipped" but its getting reflected as closed incompleted value. below is script which i used into the IF condition workflow:

 

answer = ifScript();
function ifScript(){

    if (workflow.scratchpad.state == '3') {
        return 'yes';
    }
    else{
        if(workflow.scratchpad.state == '4'){
            return 'no';
        }
    }

}
BanuMahalakshmi_0-1736432506253.png

Please let me know the correction in script or workflow to fix this issue.

Thanks.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@BanuMahalakshmi 

state 3 and 4 means closed complete and closed incomplete

Your workflow scratchpad variable is doing what it is configured to do

If it's 3 then set close complete

If it's 4 then set close incomplete

where is closed skipped coming in picture?

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

Thanks for reply. Yes, If its 3, value set to be close complete. if it is 4 - closed incomplete. but how do i declare close skipped state value(7) and how to set up value