Jump to content

calculate the previous field


This topic is 6109 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a database which we use for quotes (at least once I finish it).

It has repeating fields of item, description, price and extended. I need to make it so if discount is entered as a item, that the price calculates the qty and the last extended (line item discount... percentage of the last extended line).

I've tried everything and am about ready to give up... HELP!

Thanks

Link to comment
Share on other sites

Why don't you just enter your discount as a negative price? Why does it matter if it's applied to the previous entry?

Have you tried structuring your solution using a portal of related records instead of a repeating field? This makes things easier in the long run.

Link to comment
Share on other sites

Why don't you just enter your discount as a negative price? Why does it matter if it's applied to the previous entry?

Have you tried structuring your solution using a portal of related records instead of a repeating field? This makes things easier in the long run.

Entering it as a negative price involves calculating manually. Never a big fan of doing things that a computer can do (automatically). It would have to be applied to the previous entry since line 2 would be a discount of the previous line's "Extended".

I will investigate these "portals" you speak of... perhaps I can come up with a better mousetrap!

Link to comment
Share on other sites

I've attached a photo of the quote db. The first line would be a product (price gets pulled via relationship to parts DB).

Line 2 (my lines are misnumbered and still working on that...) would be a product called "Discount" that will take extended from the line 1's (or x-1) field and calculate accordingly. (quantity * previous repetition extended /100)

It really makes sense in my head... it's trying to convey it to the world...

quote.jpg

Edited by Guest
Link to comment
Share on other sites

If the discount is intended to apply to the item above it (and only to the item above it), it should be entered into the same line into a dedicated discount field, as a part of the same item. It will make things much easier, and after all a discount is NOT a product.

Nor related directly to your question, but important: you should not use repeating fields for this, but a related LineItems table, where each line is a separate record.

Link to comment
Share on other sites

This topic is 6109 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.