Restrict duplication on the same date and allow saving after editing

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?

Matt did a very good topic
https://community.appsheet.com/search?q=Duplicates

2 Likes

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

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())))
)

Try:

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

@Steve Thank you very much, it solved my problem