Using Correct Previous Record Details

Hi. I have a table called Barrelling_Master which records transactions for filling barrels of oil. There are only 2 products that can be entered i.e. 20 Litre Drum and 204 Litre Barrel. The user is given the option to select [Product Description 1]. The [Label From 1] column value is calculated by the MAX value in the previous recordโ€™s [Label To 1] value + 1, with the [Label To 1] Number being calculated by adding the [Quantity 1] value entered in this record to the [Label From 1] value.

There is an [Add More] option which presents a duplicate list of the same fields to enter for the second product if the user needs to create a record for both 20l and 204l products.

The scenario I am trying to cater for is

  1. User creates a record for 20l drum ONLY x 10 units so [Label From 1] = 1 and [Label To 1] = 10.

  2. User creates a second record for 20l drum x 10 units with [Label From 1] = 11 and [Label To 1] = 20 and 204l barrel x 10 units with [Label From 2] = 21 and [Label To 2] = 30.

When the next record is created I want the [Label From 1] value to pull the MAX value from the previous recordโ€™s [Label To 1] if [Label To 2] is BLANK or if not to pull the value from [Label To 2]

Really hope that makes sense.

Any help would be great, thanks.

0 3 369
3 REPLIES 3

In your case if two users are adding the record at the same time, they will have the same numbers. Is that situation possible?

@Aleksi. Would you be able to suggest an expression to achieve the above requirement?

In theory yes but operationally very unlikely.

Top Labels in this Space