Skip to main content

Search

Search

Advanced Scripting For Products

Comments

5 comments

  • Avatar
    Shotaro Ito
    Hi JKirkwood,
    Do I understood that - like this?

    input 100
    Label1: Bin 1, 40 each
    Label2: Bin 2, 40 each
    Label3: Bin 3, 20 each

    input 12
    Label1: Bin 1, 12 each

    input 80
    Label1: Bin 1, 40 each
    Label2: Bin 2, 40 each

    Mmm.

    I would use print time user prompt to input number.

    1.Create a text , give Sharename "QTY" then serialize the number decrements by 40. Enable user prompt.
    (Place this text off-label if you don't want it to get printed)

    2.To create desired copy of labels,
    In Print dialog > Quantity > Number of serialization > Option, set by datasource.(Datasource tab popped up.)
    On Datasource tab, select VB Script. Set multi-line script as
    [code]Value = Fix(QTY / 40)
    If QTY Mod 40 > 0 Then Value = Value + 1[/code]

    3.To create text to show number of products in each bag,
    Create a text and set datasource as VB Script. In Multi line script,
    [code]
    Value = 0 + QTY
    If Value > 40 Then Value = 40 [/code]
    (0 + QTY means treat shared substring QTY's value as number.)

    4.To create number of bags, just create a text and enable serialization. Disable update sub-string after print.
    (If you get Qty from database rather than user prompt, you need to reset number of bags by "OnNewRecord" event control script.)

    The procedure's somewhat cryptic so I attached format. Perhaps more simple way of doing this.
    [attachment=35:PopulateNumber.zip]

    Hope it helps!
    0
  • Avatar
    Legacy Poster
    First off....sorry for posting in 2 different threads. I wasn't sure anybody would post in the original because of the spammer. Thanks for taking care of that.

    Is there any documentation specifically about the serialization feature? I figured that might be the way to go but I was not sure. I appreciate the explanation and the example code. I will try it out and report back. I have been looking all over for some sort of in-dept tutorial or learning series videos that go into more detail about the advanced features of the product. After setting this up, I may just put a set together my self. Again, thanks for the help.

    Jkirkwood
    0
  • Avatar
    Legacy Poster
    I set the serialization up as explained and the thing works perfectly. I appreciate all the help.

    Thanks
    Jkirkwood
    0
  • Avatar
    Legacy Poster
    Shotaro,

    Is there a way to have the user input the amount per bins if they are not a standard amount?

    Thanks
    Jkirkwood
    0
  • Avatar
    Shotaro Ito
    Hi Jkirkwood,
    Unfortunately increment/decrement value of serialization cannot be specified by prompt / script, so you need different approach.

    Probably you would need to specify number of Identical copies rather than serialized copies.
    In Event control script's OnIdenticalCopy event, you can increment / decrement value.
    However I say there's some more difficulty - I couldn't reliably get "each" amount.

    Perhaps create another format to cover bin size 30 etc would be more simple solution.
    0

Please sign in to leave a comment.