Valid if to allow duplicate values in a column based on values in another column

I want to allow duplicate values in the field external order id, if the value of order type is repeat.

I am trying to use the following cote (I’m a noob):

and( [_thisrow].[order type] = “New”, Not(IN([_this],Select(FSV[External Order ID],true))))

Order Type accepts two values (enum) - New/ Repeat.

I want External Order ID to accept a duplicate value as long as order type for that particular row is Repeat

How can I do that?

OR(
  [order type] = "Repeat" ,
  NOT( IN( [_THIS] , FSV[External Order ID] ) )
)
4 Likes

This workd like a charm! Thank you SO MUCH!!!

If I could ask, what was I doing wrong?

2 Likes

You used AND instead of OR, you don’t need the “[_THISROW].” when you’re referencing a column value from the current context (current record), and table[column] is equivalent to SELECT(table[column],TRUE).

3 Likes

Got it. Super helpful!!

2 Likes