Creating conditional fields on a form

FredrikG
Kilo Contributor

When an incident is Prio1 or Prio2, there must be a Incident Report attached when changing State to Resolved.

1 How to make a mandatory checkbox appear in closure information, when the Prio is 1 or 2?

Must be checked to Resolve.

2 Can one in addition to this make a check that there is an attachment with a specific name e.g. "MajorIncidentReportxxxxxxyyyy" (Matching filename  first 19 positions accepting lower and uppercase, xxxx will be customer name and yyyy date)

1 ACCEPTED SOLUTION

Navigate to form layout and see if the box is added to any section.

Place it on the section where you want it to show up.

See Here how to change form layout

https://docs.servicenow.com/bundle/jakarta-platform-administration/page/administer/form-administration/task/t_ConfigureAForm.html

-Anurag

View solution in original post

8 REPLIES 8

Anurag Tripathi
Mega Patron
Mega Patron

Hi F,

For 

1 How to make a mandatory checkbox appear in closure information, when the Prio is 1 or 2?

Must be checked to Resolve.

Sol: you can have the checkbox field on the form and then using a ui policy you can hide the field when its not resolved, and when the user clicks on resolved make the checkbox mandatory and visible(using reverse if false) you can do it

 Here is a reference

find_real_file.png

In the ui policy action you will use your checkbox and have visible and mandatory as true

Please mark my answer correct if it solves your issue.

-Anurag

-Anurag

Thanks for the rapid reply!

Being new to ServiceNow, it would help with a more details. (I am on Jakarta)

How to get the checkbox on the form under "closure information"?

Is there a UI policy that can be reused or how to make one?

(There is one "show variable field" that sounds promising)

How to associate the UI policy to the checkbox.

 

 

How to get the checkbox on the form under "closure information"? --> NAvigate to dictionary and create a new one

table: incident

type: true/false

Then on the incident form right click on the header right click and personalize-> form layout and then add the field on the appropriate section on the place you want.

 

Is there a UI policy that can be reused or how to make one?  -> check if there is any existing ui policy with condition(state is resolved) if not then create one..

 

How to associate the UI policy to the checkbox.--> create the ui policy and then you will have a related list there with name ui policy actions, click on new and then add the checkbox field.

-Anurag

Thanks, 

Under Dictionary-New I can not change or display

Table it is filled with None

Type can be populated with True/False, but then Column label and Columns name, max length  appears. Must select Active, Read only, Display.

WHat role is required to do this changes?