Need to change Valid if formula for add and edit.

When i'm adding a new record, provided valid if function as below.

[_Thisrow].[Prod. Qty]<=(Lookup([_THISROW].[Job Ref],"Job Tracking upto Frg","Job Ref","sum Quantity Cut"))-(Lookup([_THISROW].[Job Ref],"Job Tracking upto Frg","Job Ref","sum Quantity Frg"))

But after added a record, when I go to the edit mode, it is not allowing to change the value because the the above validation showing error due the added record also getting calculated. 

I need a solution for different validif function for both add and edit.

0 2 67
2 REPLIES 2

Steve
Platinum 5
Platinum 5

Try this:

[Prod. Qty]
<= (
  ANY(
    SELECT(
      Job Tracking upto Frg[sum Quantity Cut],
      AND(
        ([_THISROW].[Job Ref] = [Job Ref])
        ([_THISROW].[_RowNumber] <> [_RowNumber])
      )
    )
  )
  - ANY(
    SELECT(
      Job Tracking upto Frg[sum Quantity Frg],
      AND(
        ([_THISROW].[Job Ref] = [Job Ref])
        ([_THISROW].[_RowNumber] <> [_RowNumber])
      )
    )
  )
)

Thanks for your Solution, I tried the below and now working fine.

[_Thisrow].[Prod. Qty]<=([_Thisrow_Before].[Prod. Qty])+(Lookup([_THISROW].[Job Ref],"Job Tracking upto Frg","Job Ref","sum Quantity Cut"))-(Lookup([_THISROW].[Job Ref],"Job Tracking upto Frg","Job Ref","sum Quantity Frg"))

Top Labels in this Space