form section to be visible only if the field value is null

Nishant16
Tera Expert

How can i show a section on the form based on the field value when it is null. can i achieve this using UI policy?

for eg: if the field value on form for "Billing ID" is null then the new section "Billing Details" should be visible which contains 4 different fields?

2 REPLIES 2

Dan O Connor
ServiceNow Employee
ServiceNow Employee

Hey. Yes you can do this using UI Policy or scripting. Personally I would just use a UI Policy. 

Set your trigger to be Billing ID IS EMPTY and then set View = FALSE for the fields you want to hide. 

Anshu_Anand_
Kilo Sage
Kilo Sage

 

trigger will be Billing ID IS EMPTY in UI policy

script section:-

function onCondition() {
g_form.setSectionDisplay('<section_name>',false);
}

On serial no. is empty

find_real_file.png

find_real_file.png

 

find_real_file.png

If it works, please mark answer as correct

Regards,
Anshu