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.

Dividing Shipping Charges By the Number of Records

Featured Replies

I hope I can explain this without making it sound more complicated than it really is.

I want to set up a set of records with an Airbill number, shipping charges, and the order number that was shipped. My problem is that multiple orders ship in one package and I want to be able to divide the shipping charges by each of those orders.

So, I'd like to have these fields:

airbill_number

order_number

total_shipping_charges

and some sort of calculation field that divides the total_shipping_charges by the number of order_numbers that share this airbill number.

We will also have multiple airbill_numbers for each order_number (each with it's own record) so I'd like to be able to get a summary of the charges for an order.

example:

Record 1: Airbill: 999991 Shipping Cost: $10 Order Number 12345 Divided Shipping Cost: $5

Record 2: Airbill: 999991 Shipping Cost: $10 Order Number 12346 Divided Shipping Cost: $5

Record 3: Airbill: 999992 Shipping Cost: $30 Order Number 12345 Divided Shipping Cost: $10

Record 4: Airbill: 999992 Shipping Cost: $30 Order Number 12347 Divided Shipping Cost: $10

Record 5: Airbill: 999992 Shipping Cost: $30 Order Number 12348 Divided Shipping Cost: $10

Summary of Shipping Charges for ON 12345 = $15

So, if I haven't confused the heck out of everyone, what would be the best way to go about this?

TIA,

.sly

  • Author

Wow! 40 views and no one has any suggestions?

Hi, sly. Forgive me if i slip into FM6 langauge, but hopefully you can translate.

Relate TableOccurrence01::orderNumber to TableOccurrence02::orderNumber. Now you can get

total_airbills_for_order = Count ( TableOccurrence02::Airbill )




You can also find


total_shipping_charges = Sum ( TableOccurrence02::divided_shipping_cost )


OR (these are mutually exclusive so as to avoid circular calcs)


divided_shipping_cost = ( TableOccurrence02::total_shipping_charges / Count ( TableOccurrence02::order_number ) )

Hopefully this points you in the right direction, as there is probably a lot more you can do with this beyond the questions you asked.

Jerry

  • Author

Thanks! That did it! Now I just have to add up all the shipping charges for each job and I will know what to bill the customer.

.sly

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.