Page 1 of 1

Cannot set variable error

Posted: Wed Jan 06, 2010 8:33 pm
by Emacc
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.

Re: Cannot set variable error

Posted: Fri Jan 08, 2010 8:21 am
by jurk
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,
Jurk

Re: Cannot set variable error

Posted: Mon Jan 11, 2010 12:15 pm
by alesp
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,

Ales

Re: Cannot set variable error

Posted: Thu Nov 04, 2010 11:15 pm
by JOH
Hi,

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.

Thanks,
JOH