NiceLabel Internal Variables – NiceLabel Reference

Target Audience: Advanced User, IT Manager
Article #: 12966

Summary

Internal variables allow you access to internal systems within NiceLabel Designer and NiceLabel Automation. Within these systems, you can access roles such as admin, user or guest, file paths and workstation details including computer name and username. This article defines and explains the different internal variables. While both Designer and Automation use internal variables, there are differences between the variables either application can use.

Information

These internal variables are used for Powerforms and in label designs.

NiceLabel Designer Internal Variables

  • LabelFileName – This is the path and file name of the currently opened label file.
  • ShortLabelName – This is the file name of the currently opened label file.
  • RequestedQuantity – This is the number of labels requested for printing.
  • TotalQuantityPrinted – This number is the sum of label quantities from all label batches that were printed.
  • CurrentBatchQuantity – This is number of labels reached in the current label batch. The value is reset at beginning of each label batch in the printing process.
  • LabelPrinterName – The name of the printer driver currently selected for printing.
  • DefaultPrinterName – The name of the default printer driver.
  • UserName – Only having a value if in-application authentication is enabled, this is the user name of the currently logged-in user.
  • SystemUserName – The Windows username of the currently logged-in user, this can be different than the application UserName, above.
  • ComputerName – The name of the computer on which the application is running.
  • SolutionFileName – Current solution file name.
  • ShortSolutionFileName – Current short solution file name.
  • SolutionFilePath – Path to solution file name.
  • FormName – The path and name of the form application used for label printing instead of Print dialog box.
  • ShortFormName – Short name of the form application used for label printing instead of Print dialog box.
  • EPCData – EPCData as read from the RFID tag.
  • LabelRevision – Label Revision Description.
  • AccessRoles – Contains comma-separated lists of every assigned access role for your users. Enable Authentication in Control Center to use AccessRoles. Your solution cannot retrieve AccessRoles from Control Center when you work offline.

Example

In the example above, the system username and the system workstation are gathered from the ComputerName and SystemUsername internal variables.

NiceLabel Automation Internal Variables

These internal variables have to do with the automation process of receiving a dropfile from a trigger such as an API call, file watch or TCP/IP.

  • ActionLastErrorDesc – All -Provides the description of the last occurred error. Use this value as feedback to host system to identify the fault cause.
  • ActionLastErrorID – All – Provides the last error ID. This is integer value. When value is 0, there was no error. You can use this value in conditions, evaluating if there was some error or not.
  • BytesOfReceivedData – TCP/IP – Provides the number of bytes received by the trigger.
  • ComputerName – All – Provides the name of the computer where the configuration runs.
  • ConfigurationFileName – All – Provides the path and file name of the current configuration (.MISX file).
  • ConfigurationFilePath – All – Provides the path of the current configuration file. Also see description for ConfigurationFileName.
  • DataFileName – All – Provides the path and file name of the working copy of received data. Each time the trigger accepts the data, it makes a backup copy of it to the unique file name identified by this variable.
  • Database – Database – Provides the database type as configured in the trigger.
  • Date – All – Provides the current date in the format as specified by system locale, such as 26.2.2018.
  • DateDay – All – Provides the current number of the day in a month, such as 26.
  • DateMonth – All – Provides the current number of the month in the year, such as 2.
  • DateYear – All – Provides the current number of the year, such as 2018.
  • DefaultPrinterName – All – Provides the name of printer driver, which is defined as default.
  • DriverType – Database – Provides the name of the driver used to connect to the selected database.
  • Hostname – TCP/IP -Provides the host name of device/computer connecting to the trigger.
  • HttpMethodName – HTTP – Provides the method name the user has provided in the HTTP request, such as GET or POST.
  • HttpPath – HTTP – Provides the path defined in the HTTP trigger.
  • HttpQuery – HTTP – Provides the contents of the query string as received by the HTTP trigger.
  • NumberOfRowsReturned – Database – Provides the number of rows that the trigger gets from a database.
  • LocalIP – TCP/IP – Provides the local IP address at which the trigger responds to. This is useful if you have a multi-homing machine with several network interface cards (NIC), and want to determine to which IP address the client connected to. This is useful for printer replacement scenarios.
  • PathDataFileName – All – Provides the path in the DataFileName variable, without the file name. Also see description for DataFileName.
  • PathTriggerFileName – File – Provides the path in the TriggerFileName variable, without the file name. Also see description for TriggerFileName.
  • Port – TCP/IP, HTTP, Web Service – Provides the port number as defined in the trigger.
  • RemoteHttpIp – HTTP – Provides the host name of device/computer connecting to the trigger.
  • RemoteIp – Web Service – Provides the host name of device/computer connecting to the trigger.
  • ShortConfigurationFileName – All – Provides the file name of the configuration file, without a path, Also see description for ConfigurationFileName.
  • ShortDataFileName – All – Provides the file name to the DataFileName variable, without the path. Also see description for DataFileName.
  • ShortTriggerFileName – File – Provides the file name to the TriggerFileName variable, without the path. Also see description for TriggerFileName.
  • SystemUserName – All – Provides the Windows name of the logged-in user.
  • TableName – Database – Provides the name of the table as used in the trigger.
  • Time – All – Provides the current time in the format as specified by system locale, such as 15:18.
  • TimeHour – All – Provides the current hour value, such as 15.
  • TimeMinute – All – Provides the current minute value, such as 18.
  • TimeSecond – All – Provides the current second value, such as 25.
  • TriggerFileName – File – Provides the file name that triggered actions. This is useful when you monitor a set of files in the folder, so you can identify which file exactly triggered actions.
  • TriggerName – All – Provides the name of the trigger as defined by the user.
  • Username – All – Provides the NiceLabel Automation username of the currently logged in user. The variable has contents only if the user login is enabled.

Example

This example shows the ActionLastErrorDesc internal variable being used to write to the TriggerFileName variable. As a result, the error generated will be placed in the drop file location.

Additional Comments

If you need further assistance, please contact us.

Author


Was this article helpful?