Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adaptive Form Table - Validate for duplicate values in table column

Avatar

Level 4

Hello,

 

I am working on an adaptive form table that is dynamic with multiple columns. Users are able to dynamically add and remove rows. In one column is a unique identifier for "Item Name" and all values should be unique in this column. When the user inputs a value in this column, it should give an error and highlight the field if it already exists. Is there an out of the box method to achieve this? 

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Employee

There is no out of the box method to do that

you will have to write some custom code

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

There is no out of the box method to do that

you will have to write some custom code

Avatar

Employee Advisor

@techddx You should create an array in the script editor, as the user is entering the value in the table field you can add that value to the array, and before inserting you can check if the value exists in the array using 'includes'.

 

const greetings = ['hi','hello'];
 
greetings.includes('hi'); // => true so you can prompt error message
greetings.includes('hey'); // => false, add this to greetings => ['hi','hey']