Kurt Knippel Posted October 15, 2000 Share Posted October 15, 2000 quote: Originally posted by stefangs: I have a project file which points to a sessions file by the project name. The project consists of several sessions. In the sessions file, there is a portal to a 'line items' file where charges are entered. The first field in the portal is a popup from a supplies file and a quantity is also entered. So far, so good. Now i want to be able to give discounts if the number of items triggers a certain quantity. This qty might never happen in a single session, but across a project. I've defined this keyfield: theKey [Calculation, Text] = "id supplies & project". Using a selfjoin with this field in the line items file, i can figure out how many items were used on the project in total in the field: qtpproject [Calculation, Number] = Sum(selfjoin, quantitysession). The bad news is that using a summary of this field on a form in the line items file with subsummaries will display the wrong info, because the calculated quantity appears on every matching record instead of just once. But i can't put the field in the master file, because there is no matchfield, unless I were to define a huge matchfield with every item in the supplies file spliced onto the current project name. what to do?? i hope i made myself clear. thanks for any help. This might be easier to accomplish with a simple script, run when preparing the invoice. Any kind of complex calculation like this might have serious performance ramifications. Plus you should only want to apply the discount at a given time, not just anytime the record is viewed. ------------------ =-=-=-=-=-=-=-=-=-=-=-=-= Kurt Knippel Consultant Database Resources mailto:[email protected] http://www.database-resources.com =-=-=-=-=-=-=-=-=-=-=-=-= Link to comment Share on other sites More sharing options...
stefangs Posted October 15, 2000 Share Posted October 15, 2000 I have a project file which points to a sessions file by the project name. The project consists of several sessions. In the sessions file, there is a portal to a 'line items' file where charges are entered. The first field in the portal is a popup from a supplies file and a quantity is also entered. So far, so good. Now i want to be able to give discounts if the number of items triggers a certain quantity. This qty might never happen in a single session, but across a project. I've defined this keyfield: theKey [Calculation, Text] = "id supplies & project". Using a selfjoin with this field in the line items file, i can figure out how many items were used on the project in total in the field: qtpproject [Calculation, Number] = Sum(selfjoin, quantitysession). The bad news is that using a summary of this field on a form in the line items file with subsummaries will display the wrong info, because the calculated quantity appears on every matching record instead of just once. But i can't put the field in the master file, because there is no matchfield, unless I were to define a huge matchfield with every item in the supplies file spliced onto the current project name. what to do?? i hope i made myself clear. thanks for any help. Link to comment Share on other sites More sharing options...
stefangs Posted October 17, 2000 Share Posted October 17, 2000 maybe this issue is beyond the scope of the forum - that's ok! but i wouldn't know how to script the matter, either. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8599 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