Validation on comma separated values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 11:50 PM
Hi Team,
I have a requirement,
We have a catalog item,where we have one variable called as'TAX ID' which is single line text field.
so users should enter the TAX ID manually,and after that we have to validate whether the 'tax id ' entered is correct or not,We are getting the 'TAX ID' from integration and is stored in tax table.
So,whenever users enter the 'TAX ID' manually we have to validate if the entered value is present in the table or not.
Issue is some values in the Tax table are stored as comma separated values as shown below:
But the users can enter only one value,so how to validate that.
Thank,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 12:21 AM - edited 01-03-2023 12:22 AM
1.You can use on change client script in your catalog form.
2. You will need to use GlideAjax as server side code will be required to check the tax table.
3. you need to query the Tax ID column of your table and check if the value entered is one of the values in table.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 01:59 AM
Hi Mega,
Thanks for your response,but mine issue is :
I have this Tax ID Column in Tax table ,here the values are comma separated.
But user can enter only one Tax ID ,suppose if the user enters 789,then also it should validate and user should be able to submit the form.How this can be done.
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 02:03 AM
You need an on change client script using glideAjax as suggested in above post. Once you have written that, the comma separated issue can be handeled.
Raghav
MVP 2023

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 12:23 AM
Hi @KARAN24 ,
You can use this solution as your starting point : https://www.servicenow.com/community/it-service-management-forum/validate-list-of-email-addresses-se...