- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 09:29 AM
Hello All,
I have a data policies created but its not working properly, can someone please check my screen shot.
What i want is, when ever i import any data using any file Name field should start with Test..... & its not working,
Just for a test purpose I imported a file in this table with random values, but it took all the values.
can someone please suggest
Thanks & Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 11:21 AM
I think you may be misunderstanding how Data Policies work. Data Policies do not allow you to do complex actions that would normally require script or to enforce or modify the contents of a field. They only allow you to change the mandatory and read-only state of a field based on conditions. You can see this in the documentation here: ServiceNow Product Documentation - Data Policy
Your desired outcome cannot be achieved with a Data Policy. Even something like "The Name must start with Test" is too complex for a Data Policy. For your desired outcome, you should probably use a scripted Transform Map (if this is for a data import) or a Business Rule that runs before insert (if this is for more than just a data import).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 11:01 AM
Hi,
The caller being empty in't the issue I'm running into. The problem I am seeing is that the newly converted UI policy doesn't actually make the contact type field mandatory. It's a gray asterisk, not a red one. I am guessing this is due to the fact that the data is preloaded.
The client changed their mind and now wants the field mandatory at all times, so this UI policy is not really needed anymore.
If my response is good,mark it as hlepful and correct.
Regards,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 11:21 AM
I think you may be misunderstanding how Data Policies work. Data Policies do not allow you to do complex actions that would normally require script or to enforce or modify the contents of a field. They only allow you to change the mandatory and read-only state of a field based on conditions. You can see this in the documentation here: ServiceNow Product Documentation - Data Policy
Your desired outcome cannot be achieved with a Data Policy. Even something like "The Name must start with Test" is too complex for a Data Policy. For your desired outcome, you should probably use a scripted Transform Map (if this is for a data import) or a Business Rule that runs before insert (if this is for more than just a data import).