How to Hide a field in a list under another field condition?

MalikB
Tera Contributor

Hello Can someone help me to handle Visibilty in List of the two fields added and how not be herited by the class u_distribution_printer :

 

This upgrade request requires the addition of two new variables to the Printer CMDB (cmdb_ci_printer):
- Installation Type: SAFEQ or STANDARD;
- Print Queue Name: Free-form field (print queue specification).
These fields should not appear in inherited classes (u_distribution_printer).

 

If "Type" = "Network", the "Installation Type" field is displayed and must be populated with one of the two possible values: "SAFEQ" or "STANDARD".

If "Type" = "Individual", the "Installation Type" field will not be displayed in the CMDB form and will not be populated. Its conditions must also apply to the list viewed when the customer is on the list.

1 ACCEPTED SOLUTION

@MalikB 

Hope you are doing good.

Did my reply answer your question?

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

View solution in original post

7 REPLIES 7

Shivalika
Mega Sage

Hello @MalikB 

 

Use Data Policy. For setting values you can use the script section there. For visibility you directly have a choice there. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway,

 

,

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

MalikB
Tera Contributor

Hi @Shivalika Thanks for your answer but in Data policy, there is not a script section there, i could execute the conditions in the form however the field that need to be hiden if there is the value "individual" in the list he can see the field and can choose a value there how can i control the condition in the form and in the list?

Hello @MalikB 

 

Did you already tried - "list_edit" option in ACL ? You can give certain conditions there to make it editable in list view. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway,

 

Regards,

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwN

eEISQCY

Ankur Bawiskar
Tera Patron
Tera Patron

@MalikB 

so what did you start with and where are you stuck?

Since you created those fields on parent table, child table will inherit those fields

Ways to achieve

1) Use onLoad client script on your table "u_distribution_printer" and handle the logic to populate and show/hide

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