how to hide embedded list

chunn
Tera Expert

Hello, can you help me.

I want to hide embedded list on the form about 運用作業日付s embedded list, when run the type of change to monthly .  

I want to client script for implementation it ? 

 

songchunpu_0-1675129197581.png

 

1 ACCEPTED SOLUTION

@chunn ,

 

You can do similar script in UI policy:

 

Condition : Run = monthly

 

Execute if true script:

function onCondition(){
var list = $$('div[tab_caption="運用作業日付"]')[0];//embeded list name
        list.hide();
}

 

Execute if false script:

function onCondition(){
var list = $$('div[tab_caption="運用作業日付"]')[0];//embeded list name
        list.show();
}

 

Please mark the answer correct/helpful based on Impact.
Regards, Shekhar

View solution in original post

12 REPLIES 12

@chunn ,

 

You can do similar script in UI policy:

 

Condition : Run = monthly

 

Execute if true script:

function onCondition(){
var list = $$('div[tab_caption="運用作業日付"]')[0];//embeded list name
        list.hide();
}

 

Execute if false script:

function onCondition(){
var list = $$('div[tab_caption="運用作業日付"]')[0];//embeded list name
        list.show();
}

 

Please mark the answer correct/helpful based on Impact.
Regards, Shekhar

@Shekhar Navhak1  I have also a probelms , Like the under I set to show or hide Embedded List .  now I want to the Embedded list is Read Only . UI Policy how do that it ? list.readOnly(); is not work..

songchunpu_0-1675238558997.png

 

@Shekhar Navhak1  hello I want to know the user have not admin role , UI Policy why is not work 

songchunpu_0-1675318059407.png

 

@Shekhar Navhak1  thank you feedback to me .

the client script  implementation it. but I want to use the UI Policy how do that is?

Like above code that UI Policy is not work 

songchunpu_0-1675212317067.png

 

 

Ankur Bawiskar
Tera Patron
Tera Patron

@chunn 

no direct way for this

you will have to use DOM manipulation in your client script and using DOM is not recommended.

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