Tuesday, August 8, 2023

List of available variables in the Label layout SCM

If you ever tried to set up Container label layout, for example, you might wonder what is the list of available variables. When you follow the guide, Container label layouts and printing - Supply Chain Management | Dynamics 365 | Microsoft Learn, there are some variables available, like RowPerLabel etc. 

In his blogpost, I going to provide the list of them and what those mean. 

  • position.rowNumber. This variable represents a row on a current label
  • position.globalRowNumberThis variable represents a row over multiple labels
  • position.labelNumberThis variable represents a current label number
  • position.labelCountThis variable represents a total number of labels created
  • position.YPos. This variable represents =StartY + rowNumber * IncY

Unfortunately, there are no such variables as position.rowCount (and/or position.globalRowCount) which can be used for the number of rows that get printed on a label. For instance, if RowsPerLabel=10 but there are only 4 rows in a record, and you want to print 4 on the label. 
The reason why it is not available it is because it would affect the performance, as you will not know the number of rows until you finish with the label and you have to go back and process the same label twice.

That's it!

1 comment:

  1. I came across your blog and wanted to take a moment to appreciate the quality of your content. Your writing style is engaging, and I found your articles to be both informative and well-researched. It's evident that you're passionate about what you write, and that enthusiasm shines through your work.

    dynamics 365 supply chain management

    ReplyDelete