Does each label represent one record of a found set? If so you could create a calculation field:
Get ( RecordNumber ) & " of " & Get ( FoundCount )
Or are you saying you have 5 for the number in No. of Containers on one record and you want to print 5 labels saying 1 of 5, 2 of 5, etc.?
Or am I way off and just don't understand :)
Does Qty Received indicate the number of containers (and labels) needed? If not what shows the required number of tables?
Are you printing Avery type sheets of labels or using a custom label printer that prints a "ribbon" of individual labels such as you get from a Dymo printer?
It's often best to set up a "Labels" table linked to your existing table with a script that generates the needed labels records by setting a match field to an ID field in your original table. You don't need fields in this table to copy over data as you can use the relationship to enable placing fields from your original table on this labels layout. You only need the ID match field and your number fields for label number of total labels in group and these three fields can get their values from a script that loops through the set of records in your original table for which you need to print labels.
After you print your labels, you can delete the records your script created in the labels table as they would no longer be needed.
Hi Phil & Steve,
Thank you for your replies.
@Steve, 5 Containers in one record (like for example 100 Kg in total but they put it in 5 containers)
@ Phil, Yes, Im printing Avery type of Labels" The Avery 05168" 3 1/2" x 5" 4 label sheet. I already make another Table I named it Labels with only Field "LABEL ID MATCH FIELD" which is a number field with auto enter as serial connected to my Product Table "PRODUCT ID MATCH FIELD" which is a number field with auto enter as serial.
"You only need the ID match field and your number fields for label number of total labels in group and these three fields can get their values from a script that loops through the set of records in your original table for which you need to print labels."
Phil, Can you please guide me with the underlined words I don't know how to set up this.
Thank you so much.
To repeat a question not yet answered: Which field in your table determines the number of labels that need be printed for that record?
The field that determines the number of labels that need to be printed for that particular record is the "No. of Container" whis is a number field.
Then if you pull up a found set of record on a layout based on your data table, this script can generate new related records in the Labels table:
Go To Record/Request/Page [First]
Set Variable [$Labels ; Data::No. of Container]
Set Variable [$ID ; value: Data::__pkPrimaryKey ]
Go to Layout ["Labels" (Labels) ]
Set Variable [$K ; value: $K + 1 ]
Exit Loop If [ $K > $Labels ]
New Record Request
Set Field [Labels::_fkForeignKey ; $ID ]
Set Field [Labels::CNumber ; $K ]
Go to layout [original layout]
On your labels layout, this text: <<CNumber>> of <<Data::No. of Container>>
will provide the "1 of 3" type entry.
Note that this method of switching back and forth between layouts, while commonly used, can trip a very long list of script triggers. There are ways to keep the scripts of any tripped triggers from executing and there are ways to create new records in a related table that rely on a more complex relationship, but do not require changing layouts.
Thank you so much for the reply, I have a problem with the script because it keeps looping. If I hit the Escape button then it will stop. It is possible to make it the created record in one layout? or make the created number of container in one layout (<<CNumber>> of <<Data::No. of Container>>) I'm using a Avery 3 1/2" x 5" which is 4 label sheets. Please find attached format.
Left out a step after the last go to layout:
Go to record/request/page [next ; exit after last]
Is it possible to put the created record in one layout? so that I can print in a 4 label sheet?
You can specify a "labels" layout. Using the new layout wizard, you can specify this type of layout and then enter the Avery number to get a layout designed for the sheet labels that you are using.