Cannot set variable error

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: 1
Joined: Wed Jan 06, 2010 8:23 pm

Cannot set variable error

Post by Emacc » Wed Jan 06, 2010 8:33 pm

I created a label with a counter variable and set the Check range min - max values. Do I need to set a default value in the form where the counter value is input by the user? I would like to be able to keep the box blank and have the user input the complete 5 digit number while having the validation check that it is within the correct range.
Currently I am getting a 103009 error when opening the form by having no default value.

Thank you
Ed M.

User avatar
Posts: 175
Joined: Wed Sep 27, 2006 1:10 pm
Location: Sencur, Slovenija

Re: Cannot set variable error

Post by jurk » Fri Jan 08, 2010 8:21 am

Can you give me your e-mail on private message here on the forum so I can send you a sample.

I am not sure what mignt be causing the error in your case, but from what I understand your problem I replicated the label and a form file and the solution is working with no problem.

Thank you,
NiceLabel Development

NiceLabel Development
NiceLabel Development
Posts: 153
Joined: Tue Sep 26, 2006 1:26 pm
Location: Kranj, Slovenia

Re: Cannot set variable error

Post by alesp » Mon Jan 11, 2010 12:15 pm

I am afraid you will have to define a default value for the counter variable if you do not want to see the error message when the variable does not have a value that would fit in the min - max range. Problem is that if you define min and max value then empty value is not considered a correct value for counter variable. The error is not shown if variable is not counter.

Another thing you could to is remove preview object from form. In this case NiceForm will not set label variables until you try to print it. But I am not sure if this is acceptable for you.

Best regards,


Posts: 14
Joined: Tue Jun 01, 2010 9:39 pm

Re: Cannot set variable error

Post by JOH » Thu Nov 04, 2010 11:15 pm


I'm having some problems with the "cannot set variable []" error message (103009). I've read all posts on here related to 103009 but sorry, can't find a solution to what I experience.

I have a Form that will extract data from an ERP, assign data to predefined variables and then simply print. My customer have approx 100 label designs, all using the same set of variables. All label designs have been "connected" to the form using "Get variables".

In one case I'll extract a string of data from the ERP that needs to be parsed and split into parts.

Might look like this:

Data: A1'A2'A3

I parse and split using ' as the separator and assign each value to different variables, SD1, SD2 and SD3. The variables are defined with max length 80, no validation and "all" characters allowed.

I get the 103009 error when trying to assign data to SD3, i.e. the "last" data.

To avoid possible "garbage" data I have used Trim to make sure the input data string is correct, verified by using Len in the VB script, i.e. no additional characters in the end of the string.

The weird thing is that once the error message is shown and confirmed (OK), the variable (SD3) is assigned the correct value.

I use a Preview in the Form and must be able to do this. Saw in other post that removing Preview might solve the 103009 issue.

Any advice highly appreciated.


Post Reply