Tag Policy that checks if a specific Key has one of a few Values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 10:58 AM
I'm attempting to setup Tag Governance, and I'm trying to configure a Tag Policy that checks if a specific Key has one of a few values. Example: The Key would be businessUnit, and the acceptable values would could be Finance, IT, HR, or Procurement. I believe this has to be scripted, but I'm not positive. Does any have any experience with this or an example script of how to make this policy work?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 11:25 AM
hi yes you need to use scripted type checks.
there's example code that gets presented - just modify it for your values.
// The script should return a string set to tagValues variable.
// your code
// tagValues = ['value1', 'value2']
if you need to look up the values against a table, you can run a glide-query, get the results into an array of unique values and assign it to the tagValues in the script.
e.g.
var tagValues = [];
tagValues = ['value2-a','value2-b'];