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.

Defining max number per record

Featured Replies

Hi,

I'm trying to built something that can give not only give me total number of carton, but also to create lines based on a max number per record..

the goal is this. I have to put 10 pieces per box, so if the qty is greater than 10 i need the db to create as many lines as needed.

For example for the first line i would just have 1 box of 3. for the second line of 17 i would have 2 boxes (1 with 10 and the 2nd one with 7), for the third line i would have 5 boxes (4 with 10 and the last box with 3)

Qty Catalog #

3 427027

17 427028

43 427029

This at the end would create a packing list.

the maximum pieces per box are 10 for a single catalog number.

Any ideas how this could be done?

thanks

The number of required boxes is =

Ceiling ( Qty / 10 )

  • Author

Thanks for the calc.

Another questions.

what can i use to have lines/records created based on the answer from the cealing calc.

for example if i put down 50 the qty of cartons would give me 5, but how can i also have it show me cartons 1-5 with 10 each.

1 ----10

2 ----10

3 ----10

4 ----10

5 ----10

i would imagine this would be a portal.

Packing_List.zip

You can use any of these:

• A repeating calculation field - see here for something very similar:

http://fmforums.com/forum/showpost.php?post/359636/

* A text calculation field, utilizing a recursive custom function;

• A portal - with a script to create the related records. This would be my least preferable option, since it requires considerable work (esp. if you change your mind). But it may be necessary if a carton can have attributes other than quantity.

  • Author

The repeating Calculation field would work perfect, but i have more attributes than just qty. Attributes such as Item Number/Size etc... so it looks like the portal might be the way to go. Do you know of any examples that i can look at that can give me an idea of where to start?

I did a search, but nothing looked even close to what i'm trying to do.

Thanks

Are you sure you need a portal? Is this used for anything else other than displaying/printing the packing list?

  • Author

My only indication why i would need a portal is because i need more information per line eg

Max per Carton =10

lines to create packing list for

1-ABCDEF = 30

2-ZXCVB = 13

carton QTY Item Color SIZE

1 10 ABCDEF WHITE M

2 10 ABCDEF WHITE M

3 10 ABCDEF WHITE M

4 10 ZXCVB BLACK S

5 3 ZXCVB BLACK S

This would only be for viewing and printing.

I see that the numbering is consecutive (per order?), even though the items are different. So yes, it would probably be better to have a script create the packing list as records in another table.

The script would be roughly:

Check if related records exist - if yes, delete them;

Load the items and their quantities into variables;

Go to the packing list table and loop to create the records.

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.