- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 03:24 AM
I have created 4 Encrypted text field in the incident form. And also created two record producer.
I want to map 3 fields in record producer to incident form's 3 encrypted field. That time , i want to hide rest 1 field.
I have done it through ui policy. By giving condition like this. if short_description is "info checking".
I created ui policy action for this condition , if it is yes visibility is false. same for both record producer. I mean i used short description of record producer to hide fields. Is it is a good practice.
Please help me
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 03:30 AM
UI Policies and Client scripts are your stuff. If you can do it with UI policy, it is preferred rather than Client script.
Business rules are server-side and you cannot hide fields on the form with them. You can use a display business rule to ask the database if your condition is fulfilled and store the answer in the g_scratchapd object, but again, you will need a client script to hide the fields based on the results, so it doesn't make sense.
Please Mark Correct AND Helpful. Thanks!
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 03:29 AM
You can use BR which will be calling UI Script. In this UI Script you can point what you need to do while passing to it's methods either the entire current object or only what you need from it (I would use this approach as the whole current object is big , hence performance issues might occur). Also you can use client script to call this UI Script :
ScriptLoader.getScripts(['sn_grc.IndicatorScheduling.jsdbx'], function() {
sn_grc.IndicatorScheduling.setNextRunTime();
});
Or as direct init of the UIScript via BR :
var uiScript = new IndicatorScheduling().setNextRunTime()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2022 03:30 AM
UI Policies and Client scripts are your stuff. If you can do it with UI policy, it is preferred rather than Client script.
Business rules are server-side and you cannot hide fields on the form with them. You can use a display business rule to ask the database if your condition is fulfilled and store the answer in the g_scratchapd object, but again, you will need a client script to hide the fields based on the results, so it doesn't make sense.
Please Mark Correct AND Helpful. Thanks!
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024