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.

Quantity overwrite issue

Featured Replies

Hi All

I'm running into a bit of a calculation dead end.

I have an "order" table displayed in a portal where my users can create orders. The user can add a group of records (a kit) from the inventory table. The first related record is a "master" record which shows a description title and a subtotal (see attached image) and where I would like the user to be able to adjust the quantity for the overall group of records. When initiated the script assigns these related records a GroupID which is currently set as a self join (OrderLine::GroupID = OrderLineKit::GroupID). The system calculates accurately if the master record quantity is set to 1, but if the user increases this quantity to two or higher I'm getting the numbers overlapping (stacked fields) and then the user can't manually adjust any of the other quantities without some strange results due to my current calculation. Some grouped records are added with pre-existing quantity amounts which need to be doubled/tripled, etc, if the user increases the master quantity, however the user should still be able to manually change any quantities.

The quantity field is where it's driving me crazy. I have the following fields that are stacked:

Qty (calc field, hidden on master record row)
KitQty (hidden on all portal rows except for the master record row)
QtyOR (quantity override, hidden on master record row)

When the group of records is added it populates the quantities in the QtyOR field. Currently my Qty field has the following calculation:

If ( isEmpty ( OrderLineKit::KitQty ) ; QtyOR ; QtyOR * OrderLineKit::KitQty )


I know my script is missing criteria which is giving me these issues. I hope I explained myself well enough for people to understand. The below image shows an example group of records with the master quantity set to two. The prices and such update properly, but there's an overwrite issue (Qty and QtyOR data displayed on far right for example purposes).

Screen Shot 2016-04-27 at 11.49.24 AM.png

Aside from this problem my system works just as expected. I'm so close to wrapping up this part of my database!

 

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.