Restrict duplication on the same date and allow saving after editing

wsaico
Participant IV

Hello, I ask you for help with a formula, I am using this formula NOT(IN([_THIS], SELECT(Aduanas[N VUELO], [FECHA] = TODAY()))) to Restrict duplicate on the same date but when editing and saving again it does not allow me.
What formula can I use?

Solved Solved
0 5 270
1 ACCEPTED SOLUTION

Steve
Participant V

Try:

NOT(
  IN(
    [_THIS],
    SELECT(
      Aduanas[N VUELO],
      AND(
        ([FECHA] = TODAY()),
        ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER])
      )
    )
  )
)

View solution in original post

5 REPLIES 5

SkrOYC
Participant V

@SkrOYC Thanks for your suggestion, I have already looked for topics related to duplicates but I cannot find the case similar to mine

Try and test if this is workaround for you.

Create VC with expression like this and set to Yes/No type

IN([_thisrow], yourTable[ID])

On opening new form to add new row, this should return False. Once the row is newly saved, then in turn return True. Let me name this VC as [init]

Then on your column you can to control with valid if, then push valid if expression like this.

IF([init],
true,
NOT(IN([_THIS], SELECT(Aduanas[N VUELO], [FECHA] = TODAY())))
)

Steve
Participant V

Try:

NOT(
  IN(
    [_THIS],
    SELECT(
      Aduanas[N VUELO],
      AND(
        ([FECHA] = TODAY()),
        ([_ROWNUMBER] <> [_THISROW].[_ROWNUMBER])
      )
    )
  )
)

@Steve Thank you very much, it solved my problem

Top Labels in this Space