ContactDownload

Advice and Support Centre

Announcement

Recent posts

Current Status

Price increases 2026

Not commonly downloaded

Latest update for all users

Getting Help With Packing Partner

Registering a user account

#1 24-04-2015 02:43 pm

pepsi_max2k
Member
pepsi_max2k

Scripting not working in 3.2?

One for andrew I think. Just upgraded from V3(.1?) to 3.2, and my script which changes pick/pack lists is now being ignored. Here's what I have in script editor window:


Module Scripting
 
 ' Function to alter PickList row formats.
 Function Print_PickingRow(ByVal Item As ItemStruct) As String
  
  ' Shorten item titles to remove everything after first dash.
  Dim ItemName As String = Item.Title.Substring(0, Item.Title.IndexOf(" - "))
  Dim ItemFormat As String = Item.SKU.Substring(0, Item.SKU.IndexOf("-"))
  Dim ItemSKU As String = Item.SKU.Substring(4)
  
  ' Format row output using html.
  Return String.Format("<td align=left style=""border:0px solid white;width:35px;font-size:6pt;vertical-align:middle;"">{0}</td><td align=left style=""border:0px solid white;width:60px;font-weight:bold;font-size:10.5pt;letter-spacing:2px;"">{1}</td><td align=right style=""border:0px solid white;width:20px;font-size:8.25pt;"">{2}  </td><td style=""border:0px solid white;width:500px;white-space:nowrap;overflow:hidden;text-overflow:clip;font-size:8.25pt;"">{3}</td>", ItemFormat, ItemSKU, Item.Quantity, ItemName)
  
  
 End Function
 
 
 
 Function Print_PackingRow(ByVal Record As RecordStruct) As String
  
  For Each Item As ItemStruct In Record.Invoice.Items
   
   
   
   ' Shorten item titles to remove everything after first dash.
   Dim ItemName As String = Item.Title.Substring(0, Item.Title.IndexOf(" - "))
   Dim ItemFormat As String = Item.SKU.Substring(0, Item.SKU.IndexOf("-"))
   Dim ItemSKU As String = Item.SKU.Substring(4)
   
   ' Format row output using html.
   Return String.Format("<td align=left style=""border:0px solid white;width:35px;font-size:6pt;vertical-align:middle;"">{0}</td><td align=left style=""border:0px solid white;width:60px;font-weight:bold;font-size:10.5pt;letter-spacing:2px;"">{1}</td><td align=right style=""border:0px solid white;width:20px;font-size:8.25pt;"">{2}  </td><td style=""border:0px solid white;width:500px;white-space:nowrap;overflow:hidden;text-overflow:clip;font-size:8.25pt;"">{3}</td>", ItemFormat, ItemSKU, Item.Quantity, ItemName)
   
   
  Next
  
  Return String.Format("")
  
  
 End Function
 
 
 
 
End Module

Last edited by pepsi_max2k (24-04-2015 02:43 pm)

Offline

#2 24-04-2015 02:51 pm

Andrew
Admin
Andrew

Re: Scripting not working in 3.2?

Yes, there have been some major changes in scripting from V3.1 to V3.2
Please Email us a number to call you, so I can connect and sort this out.

Offline

Board footer