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!!

Solved Solved
0 2 171
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

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:

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

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:

Thank you so much!!

Top Labels in this Space