We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Variables are not showing in RTIM and SCTASK

nameisnani
Mega Sage

Hi Team , 

 

can any one please help me here 

 

We have catalog called ' simcisry'

 

Variables we have 

nameisnani_0-1715762491351.png

 

when i submit form from serviceportal 

nameisnani_1-1715762539229.png

 

If we check ritm in variables section , [ short descripition and description ] is not showing . Please screenshot below 

nameisnani_3-1715762647103.png

For SCTASK also same , behavior .

 

In workflow i have added variables also , but still those two variables ' short description and description ' is not showing .

 

can anyone please provide what is the solution for this . Please help me here .

 

Please provide detalied steps to resolve this issue 

 

Thanks in advance

8 REPLIES 8

A_maity002
Tera Contributor

Hello @nameisnani ,

 

While creating any variable you can make those variable as 'Global'. Then all the details might be showing in RITM and SCTASK also.

 

Please mark this comment as Correct Answer/Helpful if it helped you.

 

Regards,

Atanu Maity

nameisnani
Mega Sage

Hi @swathisarang98 

 

Your logic got worked out , But cilent is saying when form loads they don't want short desp and descp to be visible first , based on the condtions short desp and desp to be visible .

nameisnani_0-1715827620809.png

 

@nameisnani just make the below changes,

 

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
        g_form.setMandatory('description_1', false); // description variable name
        g_form.setMandatory('short_description_1', false); // short description variable name
        g_form.setDisplay('description_1', false); // description variable name
        g_form.setDisplay('short_description_1', false); // short description variable name
    }

    g_form.clearValue('description_1'); // description variable name
    g_form.clearValue('short_description_1'); // short description variable name

    if (newValue == "prod_access_scdaas") // choice value
    {
        g_form.setMandatory('description_1', false); // description variable name
        g_form.setMandatory('short_description_1', false); // short description variable name
        g_form.setDisplay('description_1', false); // description variable name
        g_form.setDisplay('short_description_1', false); // short description variable name


    } else {
        g_form.setMandatory('description_1', true); // description variable name
        g_form.setMandatory('short_description_1', true); // short description variable name
        g_form.setDisplay('description_1', true); // description variable name
        g_form.setDisplay('short_description_1', true); // short description variable name
    }

}

 

 

Let me know whether this works for you or not ?

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

@nameisnaniif my response helped you please accept my Solution or let me know if you still have any issues.

 

Happy to assist 

Swathi