Filter to create a check of two conditions to avoid duplicating data

Hello, how can I create a filter for a form that checks the table where the data will be recorded if the value of one of its columns does not exist according to 2 conditions, basically what I want is to check that it is not duplicating the document number of the same vendor in the data table records to avoid data duplication. This table has a column for vendor and another for document number.

Here I show you the form:
3X_b_0_b017ba85e8f44c00c893c1891a95c63d6c8feb7c.png

Proveedor = Vendor
Nยบ Documento = Document Number

Right now the formula I am using certainly checks that the document number is not being duplicated, but I need to apply a second condition to check that that document number does not already exist from the same vendor.

ALL these statements are true:
โ€ฆ1: This statement is false:
โ€ฆ(The value of column โ€˜Nยบ Documentoโ€™) is one of the values in the list (The list of values of column โ€˜Nยบ Documentoโ€™
โ€ฆfrom rows of table โ€˜Cuentas por Pagarโ€™
โ€ฆwhere this condition is true: (This statement is false:
โ€ฆ(The value of column โ€˜ID Transaccionโ€™) is one of the values in the list (LIST(
โ€ฆThe value of โ€˜ID Transaccionโ€™ from the row referenced by โ€˜ID Transaccionโ€™))))
โ€ฆ2: This statement is false:
โ€ฆ(The value of column โ€˜Nยบ Documentoโ€™) is one of the values in the list (The list of values of column โ€˜Proveedorโ€™
โ€ฆfrom rows of table โ€˜Cuentas por Pagarโ€™
โ€ฆwhere this condition is true: (This statement is false:
โ€ฆ(The value of column โ€˜ID Transaccionโ€™) is one of the values in the list (LIST(
โ€ฆThe value of โ€˜ID Transaccionโ€™ from the row referenced by โ€˜ID Transaccionโ€™))))

Thanks!!

Solved Solved
0 7 433
1 ACCEPTED SOLUTION

OK.

Then, what about this:

ISBLANK(
  FILTER("Cuentas por Pagar",
  AND(
    [_THISROW].[Nยบ Documento]=[Nยบ Documento],
    [_THISROW].[Proveedor]=[Proveedor]
  )
)

Or, if you set this in the [Nยฐ Documento] Valid_If field:

ISBLANK(
  FILTER("Cuentas por Pagar",
  AND(
    [_THIS]=[Nยบ Documento],
    [_THISROW].[Proveedor]=[Proveedor]
  )
)

Let us know if that works for you

Edit: For reference:

View solution in original post

7 REPLIES 7
Top Labels in this Space