Prevent Duplicate Records

Rakshanda Kunte
Tera Contributor

Hi All,

Kindly, help with your inputs for below requirements.

 

Catalog Item Variables: 

1. Groups 

RakshandaKunte_0-1682848230539.png

 

2. Modules: Aa and Bb (only 2 choices)

RakshandaKunte_1-1682848254597.png

 

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)

RakshandaKunte_3-1682848834443.png

 

 

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 

 

 

13 REPLIES 13

Hi @Sandeep Rajput ,

 

Thanks for your inputs.

 

I have written Script Include and Client Script, but it shows that there is an error in JavaScript.

 

Script Include:

RakshandaKunte_0-1682930136091.png

 

 

Catalog Client Script:

 

RakshandaKunte_1-1682930178806.png

 

Error:

"There is JavaScript Error in Browser Console."

 
 

Can you please help in this?

 

@Rakshanda Kunte Could you please check the browser console when the error appears and share the detailed logs here?

Hi @Sandeep Rajput ,

 

The record is created and submitted but it shows below error and script include is not returning any value.

 

 

RakshandaKunte_0-1682933153196.png

 

@Rakshanda Kunte I have sent you a message, please check.