Jalz Posted November 15, 2007 Posted November 15, 2007 Hi Guys, I have stock and a deliveries TO in my file. The product has a field called current stock, which for e.g. could be 100. The deliveries table may a several records, each with a date and number of items. What I would like to do is calculate how many items are remaining from each delivery. So for Eg. Stock Table Occurance Current Stock = 100 Delivery Occurance (4 records for example) 1) Date 1/4/2007 Number Delivered 50 [calculated field should say 50] 2) Date 1/3/2007 Number Delivered 20 [calculated field should say 20] 3) Date 1/2/2007 Number Delivered 10 [calculated field should say 10] 4) Date 1/1/2007 Number Delivered 40 [calculated field should say [color:red]20 not 40 as the current stock is 100 and not 120, first in first out approach] Any help much appreciated. I have also included a file to show you what I mean as I think Ive not explained it very clearly. delivery.zip
Jalz Posted November 16, 2007 Author Posted November 16, 2007 Not to worry guys, Ive worked it out using getnthrecord and a relationship which is sorted decending.
Recommended Posts
This topic is 6277 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now