Jump 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.

New Multiple Prices based on Quantity and name

Featured Replies

OK.

The issue with the Case( not working was localization - I had to use a semi colon instead of a period.

But now, I have another issue - I'm building an online shopping cart and I have four databases - customers, carts, products, and orderitems.

Orderitems is the database that the customer sees their shopping cart through - when a customer adds a product to the shopping cart, the product price is looked up and placed into the orderitems file. The quanity the user sets for this item is a field that directly resides in orderitems.

My issue is this: In the end, I want to have lower prices for higher quanitities. I have three fields - quantity, price, and name. I want to have a formula that basically says this:

If the product is "watch", qty is < or equal to 10, then the price should be $10. If this qty is >10 then the price should be $20.

I know how to use the Case ( for strictly dynamic total based on a quantity field, but can it work for quantity and a name field?

I really hope someone can help with this.

Thanks,

Chris

I suggest that you keep set up a product/qty/price file rather than using a case function. This will give you more versatility. In your order file you can make a calculated field called ProductQty which is the concatenation of the product ID and the Quantity, like so:

ProductID & ":" & Right("00000" & Qty,5)

If the ProductID is "Watch" and Qty is 15, then the result of the calculation will be "Watch:00015"

Then you can set up a Price file that contains a record for each combination of price and quantity for each product. Like this:

ProductID, MinQty, Price, ProductQty

-------------------------

Watch, 0, 20.00, Watch:00000

Watch, 20, 10.00, Watch:00020

Bathtub, 0, 120.00, Bathtub:00000

Bathtub, 200, 89.95, Bathtub:00200

etc.

Now all you have to do is set up a relationship between the OrderItems file and the price file based on the ProductQty fields. Then set the price field in the OrderItems file to autoenter looked up value from the price file and select the "copy next lower" option. This will then automatically pick the correct price for a given product and quantity. Plus, you can have as many quantity discounts for a product as you want.

By the way, I highly recommend that you use a stock number or other unique ID number like "wtch0018" rather than a descriptive word like "Watch" to identify a product. Otherwise, what happens if you start to sell two different kinds of watches?

Create an account or sign in to comment

Important Information

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

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.