In onchange client script I'm unable to hide Container start

Sirri
Tera Guru

Hi All,

 

I'm unable to hide  container start when onchange of field. I I have written the code onchange client script I'm getting the alert as expected but it is Unable to hide the container start.

 

please let us know why this is happening .

for more details please find the attached document.

 

Thank you

3 REPLIES 3

anshulgupta007
Tera Contributor

hi Sirri,

 

may be there are mandatory fieldls exists within the container and hence client script is unable to hide the container and fields within it.

Before hiding container with g_form.setDisplay('variable',false) API, make sure, the mandatory variables within the container are set as non-mandatory via g_form.setMandatory('variable',false) API.

Maddysunil
Kilo Sage

@Sirri 

Please check this link for root cause:

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0745114 

 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks