i had one catalog variable need to hidden on catalog form , visible and editable on ritm form

priyagudipa
Tera Contributor

i had one catalog variable need to hidden on catalog form , visible and editable on ritm form

9 REPLIES 9

Tanushree Maiti
Kilo Patron

Hi @priyagudipa 

Use  2 Catalog UI policy

 

1. Catalog ui policy - it applies to catalog item only ( no ritm  or sc_task)

   Using UI policy action for that variable

     make display =false

 

2. Create another catalog ui policy

it applies to catalog task only 

   Using UI policy action for that variable

     make display =true

       ReadOnly =false

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Hi @Tanushree Maiti i have already tried this solution , but it is not making the variable editable at the ritm level

 

Hi @priyagudipa 

 

Just check if other catalog UI policy /client script is conflicting.

Give this catalog UI policy's order  as highest one.

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@priyagudipa 

You can create single onLoad catalog client script and handle this

Ensure "Applies on Catalog Item" and "Applies on Requested Item" are TRUE

function onLoad() {
    var url = top.location.href;
    if (url.indexOf('sc_cat_item') > -1) {
        // catalog form
        g_form.setDisplay('variableName', false);
    } else {
        // RITM 
        g_form.setDisplay('variableName', true);
    }
}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@priyagudipa 

Did you get a chance to check my above approach?

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