landscaper Posted July 23, 2008 Posted July 23, 2008 Hi, I'm stumped. Hope this is the best place to post this. In the process of converting an invoice layout from repeating fields to using portals, I have been unable to calculate totals for different line item types, ie. plants, hargoods and labor as I was able to using the repeating field format. The following calculation gave me the info desired and I need to be able to duplicate these same total using portals. If(Left(code;1)="p";line price;0) gave me a plant total If(Left(code;1)="h";line price;0) gave me a hardgood total If(Left(code;1)="l";line price;0) gave me a labor total. I need to be able to seperate these by these group for sales tax reasons and discount reasons. I have tried to do subsummaries sorted by code, to add the above calculations to the table associated with the portal layout with no success. What is the best way to accomplish this? summary fields, subsummaries? Thanks in advance for any suggestions. lj
Fenton Posted July 24, 2008 Posted July 24, 2008 First, you can do those "If" calculations in the line items table. Then you could use Sum ( line_items::plant_price), Sum (line_items::hardgood_price), etc.. in the Invoice table to get the totals. It's almost the same as what you were doing with the repeating fields. There is something about using relationships which is throwing you. It shouldn't, after you get used to it. Alternatively, you could create separate relationships for the different types of line items. If you had a calculation, "p", in the Invoice table, then created a relationship from that to line items, to the "code" field, AND the Invoice ID to the Invoice ID, a calculation, Sum ( that relationship::line price) would be the plants total for the Invoice. The relationship could also be used to produce a portal of only plants. So you could use this structure to separate data entry and viewing for the different codes, if you wanted to.
landscaper Posted July 24, 2008 Author Posted July 24, 2008 Thanks for the reply. After so long of using the repeating field method.... I'll give it a shot in the A.M. thanks again lj
Recommended Posts
This topic is 6026 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