Adaptive Form Table - Validate for duplicate values in table column | Community
Skip to main content
Level 4
April 13, 2022
Solved

Adaptive Form Table - Validate for duplicate values in table column

  • April 13, 2022
  • 2 replies
  • 807 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by workflowuser

There is no out of the box method to do that

you will have to write some custom code

2 replies

workflowuserAdobe EmployeeAccepted solution
Adobe Employee
April 13, 2022

There is no out of the box method to do that

you will have to write some custom code

Mayank_Gandhi
Adobe Employee
Adobe Employee
April 14, 2022

@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']