Can I use Valid_If constraint only when filling forms, but not when editing past input?

Hi,

In an Inventory, I’m using a Valid_IF to make sure I don’t sell a greater amount of product than the one I have. But sometimes I want to edit the sale (with an action button) and I no longer want the Valid_IF constraint to work, since I’m editing and not inputing a new sale.

This is my current Valid_IF, I want it to work ONLY when inputing a new sale and NOT when editing a past one.

[BarCode].[Available Stock]>=[Q]

Thank you!!

Try:

OR(
  ([BarCode].[Available Stock] >= [Q])
  IN([_ROWNUMBER], table[_ROWNUMBER])
)

Replace table with the name of the table containing the row you’re editing.

See also:

2 Likes

Thank you so much!!

1 Like