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.

Featured Replies

I have the following two tables (simplified) which are a one to many relationship by 'order_no'

1) Order with fields order_no, date, purchaser

2) Items with fields order_no, fruit, variety, boxes, box_wt, lb_cost

A single order could have multiple items such as 2 varieties of oranges and 2 varieties of apples. I would like to sum the number of boxes, total weight and total cost by 'fruit'. I have tried to add the fields to the 'Order' table and using the IF() function but it calculated the overall totals for both oranges and apples, not by 'fruit'. I am relatively new to FM 10 (started learning several months ago but got pulled away). What is the simplest way to accomplish this? Create a new table with the subtotals?

Thanks a bunch.

What is the simplest way to accomplish this?

Summarize the line items by fruit.

Do you want #boxes per fruit across orders or just within one order?

I think if you just want a report you can create a summary field in items=total of #boxes. Then when you sort your items by fruit, each group will be just one fruit, and the summary will be total of # boxes for each group (ie fruit).

If you want results that are more dynamic than that (ie don’t require the sort/preview), the only way I know how is to have yet a third table that is called “Fruit” and matches items by fruit::fruit=item::fruit. In fruit you would have a calc that =sum(items::#boxes)

  • Author

I need to summarize by fruit (oranges or apples, in this case) within an order, not across all fruits in the order.

Thanks for the suggestions. I'll try both.

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.