Picking structured items

Setup for picking structured items and their variants with main components and subcomponents

For BxMobile to understand the connection between the structure lines, we need to establish a relationship between the components. This is achieved by using three specific fields in the Bx line query.

  • bxLineType indicates whether it is a main component or a subcomponent and has different variants for automatically filling out the quantity based on other lines.
  • bxParentLine specifies which order line is the main component.
  • bxParentFactor indicates how many subcomponents that are needed to complete one full structure of the main component.

The lines can then be combined with options for color, font size and margin to create a clear visulization of how the structure is set up, or they can be completely hidden if desired.

  • cfg_fontSize controls the font size of the line, with 17 set as default.
  • cfg_productnameMargin controls the margin to the product name and is set to 25 in the examples.
  • cfg_sendToServer controls whether the item line should be sent to the ERP system or not. In Visma Business, issues can arise when both the main component and the subcomponent cannot be completed simultaneously. In such cases, sendToServer = false can be set for the relevant lines.


Here is an example of how the query might look with the main component as auto:

PickinglistLines in Visma Business 
(without completing the main component)
ol.NoPerStr bxParentFactor,
ol.StHLnNo bxParentLine,
CASE
  WHEN ol.edfmt & 262144 = 262144 then 'MainComponentAuto'
  WHEN ol.StHLnNo > 0 then 'SubComponent'
  ELSE''
END bxLineType,
CASE
   WHEN ol.edfmt & 262144 = 262144 then 'false' -- main component should not be completed
ELSE 'true'
END cfg_sendToServer,

PickinglistLines in Visma Global

ol.structurequantity bxParentFactor,
CASE
WHEN ol.structurelevel = 1 then NULL
ELSE ol.structureid
END bxParentLine,
CASE
   WHEN ol.structurelevel = 1 then 'MainComponentAuto'
  WHEN ol.structurelevel = 2 then 'SubComponent'
  ELSE''
END bxLineType,


The component can either have "Auto" appended or not. When "Auto" is appended, the quantity can not be manually selected, but will instead increase based on the other lines in the structure. 

MainComponentAuto will increase the quantity on the main component when the subcomponents complete a full structure of the main component.

SubComponentAuto will increase the quantity of subcomponents by the factor when the main component is picked.

It is also possible to set up a combination of these if you want to pick just some of the subcomponents, while the rest are filled in automatically.