Prevent Duplicate Records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 03:09 AM
Hi All,
Kindly, help with your inputs for below requirements.
Catalog Item Variables:
1. Groups
2. Modules: Aa and Bb (only 2 choices)
This is creating a record on Table: (Table Name = Demo)
Field on a Table:
1. Module (Reference)
Condition: Once 'Aa' is selected on a catalog form, it will map to Module field on a table with "Post 1" value.
if "Bb" selected on catalog form, it will map "Post 2" value on table. (This is done using flow designer)
Requirement:
If there are existing records on table with group name = ABC and Modules = Aa and Bb, then it should not allow to create another record.
i.e., if there are already records created as below then it should give error msg.
If there Record is created with only 1 Module (i.e. Aa) then it will allow to create another one with module Bb.
E.g.,
1st Record
Catalog Form Variable:
- Group = ABC
- Module = Aa
Record created on a table with below field:
- Module = Post1
2nd Record
Catalog Form Variable:
- Group = ABC
- Module = Bb
Record created on a table with below field:
- Module = Post2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 05:41 AM
@Rakshanda Kunte does your u_demo_table have u_group and u_modules field defined on it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 06:44 AM
yes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 07:36 AM
@Rakshanda Kunte Please share a screenshot of your flow and dictionary view of u_demo_table showing all the fields and their field types defined on that table. In the context menu on your u_demo_table form>>Configure >>table
e.g. Here is the dictionary view of incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 08:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2023 10:24 AM
@Rakshanda Kunte There are a couple of ways using which you can tackle the duplicate issue.
1. Stop the user from creating a duplicate entry on the catalog item itself: This can be done by defining a Client callable script include and have a function checking if the group and module combination already exist. Call this method in onSubmit Script and return false in onSubmit script if the script include returns that the record already exist. Show an error at the same time.
2. Via flow:- If you do not wish to show an error and let the user submit the catalog item and create the record using the flow itself then you should update your flow as follows.
Lookup records is used to check if the group and module combination already exist or not. If it doesn't then the new record is added to the table.