Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple Calculations for one field

Featured Replies

  • Newbies

Our database has a quotation table. We have a drop down menu for products and one for quantity, total and price.

 

The price field is a calculation field which the calculation is If (Product = "A2 Poster" ; "£10) which works fine.

However obviously we have more than one product we sell, when i try to put another product calculation next to this it does not work.

 

How can i have multiple calculations in the price field for each drop down in "Product field"

 

 

You'll need a related Products table with IdProduct, Product and price fields.

Then, whenever you enter the idProduct and quantity into the Quotation table, a simple calculation:

quantity * Products::price

will solve your problem.

  • Author
  • Newbies

Thank you.

 

However we need to have various drop down menus for each item. I have managed to get the calculation working now with Case ( ....

 

It works for one field, but for instance if we say A2 poster = £10.00 we also need to say A2 Poster + another field drop down with Laminated 

 

The calculation only allows me to enter for one field ??

Could you clarify this statement?

 

However we need to have various drop down menus for each item.

 

 

Speaking in general, you won't get very far with your approach. For one thing, you cannot place prices in calculation formulas, because prices change over time.  For another, maintaining a set of fields for each item sold can quickly get out of hand.

 

Have a look at a basic invoice demo here:

http://fmforums.com/forum/showpost.php?post/309136/

  • Author
  • Newbies

We basically need to set up a quotation table with drop downs

 

So product A = £? Product B = £?

 

For each product there would be drop downs for extras then a quantity field etc then lastly one field with the calculated price based on the options of the product

 

So for instance 

 

A2 poster - Laminated - Next day delivery - x3 = ? 

 

each of these options would have there own drop down then the last field for the price, what is the easiest way i can do this.

 

I have been using prices in calculation formula's previously with no problems?

I have been using prices in calculation formula's previously with no problems?

 

But have you ever changed your prices? If you have quoted someone a A2 Poster for £8 and then raised the price to £10, all you previous quotes will be updated with the new price. If it's important to keep the quotes as they were submitted to the prospective customers, then this is unacceptable. If it's not important, then why do you keep them at all?

 

In addition, prices are data. Updating the price list should be in the province of the user - and not require the intervention of a developer to make a change in the database schema.

 

 

For each product there would be drop downs for extras then a quantity field etc then lastly one field with the calculated price based on the options of the product

 

So for instance 

 

A2 poster - Laminated - Next day delivery - x3 = ?

 

Are these options the same for all products? Or does each product carry its own set of options?

  • Author
  • Newbies

Each product would carry different options? however some would be the same yes.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.