Page 1 of 1

Dynamical use of setvaluesets

Posted: December 29th, 2013, 9:28 am
by zwan
Hello guys,
I am a little confused about the setvaluesets function.

While this works: :D

Code: Select all

setvaluesets("_HH1020");
This one does not: :o

Code: Select all

VAR1020 = "_HH1020";
setvaluesets(VAR1020);
Nor does the following: :x

Code: Select all

VAR1020 = "_HH1020";
setvaluesets(maketext("%s",VAR1020));
And ALPHA VAR1020; has been declared in PROC GLOBAL


Why? I am using CSPro 5.0.3

I want to dynamically change value sets for a number of items.

Thank for your help

Re: Dynamical use of setvaluesets

Posted: December 30th, 2013, 10:33 am
by Gregory Martin
I suspect that the problem has to do with the spaces that probably exist to the right of the characters in your VAR1020 string. Try this instead:
setvaluesets(strip(VAR1020));

Re: Dynamical use of setvaluesets

Posted: December 30th, 2013, 12:10 pm
by zwan
Oh yes! :lol: It works and still that's a weird behavior. :shock: