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.

Combining Multiple Orders into One (Consolidating line items)

Featured Replies

Here's my situation,

i have a bunch of order records with line items. For a given found set of orders, I do a "Get Related Records" and get a found set of all the line items across several orders. Let's say one order has 20 units of product A for a total of 20$ and another order has 10 units of Product A at $25.00 (pricing for products differs throughout the year)

How do I loop through this data and generate at the end a set of consolidated line items for all the orders, so that my new consolidated order (the idea of the script is to take many small orders and generate one big order out of them) would have 30 units of product A at a price of $45.00 ?

Any insights? If FileMaker were PHP, I'd loop through the records and use a keyed array to keep track of the products, quantities, and dollar totals... it would be easy! But my brain can't come up with an equivalent solution in filemaker script.

Any ideas?

If FileMaker were PHP, I'd loop through the records and use a keyed array to keep track of the products, quantities, and dollar totals...

Why can't you do that in FMP using a script variable?

OTOH you could display/print the existing line items through a summary report and total them on the fly.

the idea of the script is to take many small orders and generate one big order out of them

What's the idea of the "consolidated order"? It doesn't seem to represent anything real or useful.

OTOH, you can easily produce a report of the LineItems table, summarized by product. Or add calculation fields to the Products table, summing the quantity and the extended price of the related line items.

  • Author

Thanks everyone I used the export grouped and re-import technique and it worked like a charm. The idea behind a "consolidated order" is to get hundred of small (a few bucks each) web orders into the accounting system under a single monthly "web sales" order.

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.