VBScript not assigning values.

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Posts: 2
Joined: Wed Dec 19, 2018 2:01 pm

VBScript not assigning values.

Post by Dr.Phlox » Wed Dec 19, 2018 2:27 pm

Good afternoon!

I'm having a rather peculiar problem:

I'm using a VBScript to switch between German and French text on my label. I used the exact same Code on a different Label, I just renamed some Data Source variables. It works perfectly fine there.
For that I'm using multiple variables, this is what the code approximately looks like:

Code: Select all

Dim DescrDE 
Dim DescrFR 
Dim QtyDE 
Dim QtyFR 
Dim ColorDE 
Dim ColorFR 
Dim ArtNoDE
Dim ArtNoFR 
Dim ColorWertDE 
Dim ColorWertFR

LANG = [Language]
QtyDE = "Menge"
QtyFR = "Quantité"
ColorDE = "Farbe"
ColorFR = "Couleur"
ArtNoDE = "Artikelnummer"
ArtNoFR = "Numéro d'article"

If LANG = "DE" Then
[Beschreibung] = DescrDE
[AnzahlLabel] = QtyDE
[FarbeLabel] = ColorDE
[ArtikelnummerLabel] = ArtNoDE
[Farbe] = ColorWertDE

[Beschreibung] = DescrFR
[AnzahlLabel] = QtyFR
[FarbeLabel] = ColorFR
[ArtikelnummerLabel] = ArtNoFR
[Farbe] = ColorWertFR
End If
Now, the values I assign are shown in the Designers Preview:


However, as soon as I switch to printing, the values are no longer shown. If I tick the box "Value Required", I get an error that it's empty.


What I have tried so far:
  • Check if they're Phantoms
  • Check if their visibility is depending on another variable
  • If another variable interferes
  • If my SQL is interfering
  • If my Syntax is correct
I'm at a loss at this point, I have been hunting for an error for the past 3 hours and had 2 other coworkers check my work and nobody can find a mistake. ](*,)

I hope somebody here can help me!

User avatar
NiceLabel Support
NiceLabel Support
Posts: 562
Joined: Mon Aug 28, 2017 3:07 pm

Re: VBScript not assigning values.

Post by Kyleodonnell » Wed Dec 19, 2018 4:46 pm


We recommend opening a support case with the support team https://www.nicelabel.com/support/technical-support as the team will need all of your files to test your solution.

Posts: 2
Joined: Wed Dec 19, 2018 2:01 pm

Re: VBScript not assigning values.

Post by Dr.Phlox » Thu Dec 20, 2018 8:25 am

Nevermind, I forgot to drag the function on to the Label. That was the rpoblem.

Post Reply