Please provide the code "Don't allow the member to create duplicate record on custom table"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 02:04 AM
Hi Community,
I have created a custom table and add 5 fields like From location, To location, journey date, duration, user and created record
Please provide the code for "Don't allow the member to create same kind of record, It will show error message for duplicate record"
Regards,
Srinivasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 04:38 AM
Hi @Srinivasu2
You want to check for duplicity on all the 5 fields or on a single field ? If single, on which field ?
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 04:59 AM
Hi @Amit Verma.
Thank you for the response
I want to check for duplicity on the 4 fields, like From location, To location, journey date, user
Thanks,
Srinivasu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 05:07 AM
Hi @Srinivasu2
Have you tried setting the dictionary field "unique=true" on each of the four fields ? You can give this a try. Also, please refer below links which might be useful :
Please give this a try and share the results.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 05:20 AM
you can use before insert BR and query the table to check if combination of those 4 field values exist
what script did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader