Skip to main content
vinayj0006
May 10, 2024
Solved

Throw validation for duplicate entry in editable grid for a feild Account Number

  • May 10, 2024
  • 3 replies
  • 0 views

Hi team,

 we have a  requirement to enter a multiple Account Numbers from a Editable grid. but has to validate the entry when there is a duplicate row.

I have tried using contains function but not able to solve. please help

Best answer by stefanhelzle0001

There are a few options to implement this.

In general, for a given row, you want to check whether the same value is used in the OTHER rows. So a validation could be like:

contains(remove(ri!accountList.accountNumber, fv!index), fv!row.accountNumber)

This is probably not exactly working code, but it shows how to implement the described idea.

3 replies

stefanhelzle0001
Brainy
May 10, 2024

What exactly does "duplicate" mean for you?

What did you try with the contains function?

vinayj0006
May 10, 2024

If there is  same account number entry  in the grid for two rows, the validations has to throw duplicate entry

contains(ri!accountList,fv!item), the current item value in the row

stefanhelzle0001
Brainy
May 10, 2024

There are a few options to implement this.

In general, for a given row, you want to check whether the same value is used in the OTHER rows. So a validation could be like:

contains(remove(ri!accountList.accountNumber, fv!index), fv!row.accountNumber)

This is probably not exactly working code, but it shows how to implement the described idea.