Input Validation using two columns

I have a table named PRICING that has three columns i.e CUSTOMER NAME, SKU, PRICE
I need to have validation to ensure that there is no duplicate entry added for same CUSTOMER NAME and same SKU

Request if someone can help with appropriate logic for achieving the above input validation

Regards,

Solved Solved
0 4 255
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Use this as the Valid If expression for the Customer Name and/or SKU columns:

OR(
  ISBLANK([Customer Name]),
  ISBLANK([SKU]),
  ISBLANK(
    FILTER(
      "Pricing",
      AND(
        ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER]),
        ([Customer Name] = [_THISROW].[Customer Name]),
        ([SKU] = [_THISROW].[SKU])
      )
    )
  )
)

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

Use this as the Valid If expression for the Customer Name and/or SKU columns:

OR(
  ISBLANK([Customer Name]),
  ISBLANK([SKU]),
  ISBLANK(
    FILTER(
      "Pricing",
      AND(
        ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER]),
        ([Customer Name] = [_THISROW].[Customer Name]),
        ([SKU] = [_THISROW].[SKU])
      )
    )
  )
)

Hi Steve,

Could you please help me out with the following?

Correct syntax for two Valid If conditions to validate correct input

Iโ€™ve used one Valid If condition in my App and it works fine. Now I need to add another Valid If condition that uses a calculated number from another sheet/table/cell. I know Iโ€™m supposed to use the AND in my validation condition, but I donโ€™t know exactly how. BTW, Iโ€™m a non-technical newbie, so please bear with me, and make the answer simple to understand and implement! Many thanks!

Parag

Thanks very much @Steve

Top Labels in this Space