Make fields read-only and mandatory based on other field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:15 PM
Hi All,
I need to make the fields mandatory and read-only based on the other field value.
for ex. Please see screenshots. For Originator the fields should be mandatory and in the Other Section TSD the fields should be read-only. For TSD the tsd user can fill the fields and in the Originator section fields should be read-only.
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:24 PM
Hi @Dileep2
Here are the steps on how to make fields mandatory and read-only based on the other field value in ServiceNow:
- Log in to ServiceNow as an administrator.
- Go to System Definition > Fields.
- Click the Edit button for the field you want to make mandatory or read-only.
- In the Field Properties section, set the Mandatory and Read Only flags to the desired values.
- Click the Save button.
For example, to make the fields in the "Originator" section mandatory and the fields in the "Other Section" read-only, you would set the Mandatory flag to Yes for the fields in the "Originator" section and the Read Only flag to Yes for the fields in the "Other Section".
You can also use UI Policies to make fields mandatory or read-only based on the value of another field. UI Policies are a way to control the behavior of fields on a form. To create a UI Policy, you would need to go to System Definition > UI Policies and click the Create button.
In the UI Policy dialog box, you would need to select the field you want to make mandatory or read-only and then specify the condition that would trigger the change. For example, you could create a UI Policy that makes the fields in the "Originator" section mandatory if the value of the "TSD" field is equal to "Yes".
Once you have created the UI Policy, it will be applied to the form. The fields will then be made mandatory or read-only based on the value of the other field.
Please mark the answer as correct solution and helpful if helped.