Dynamical use of setvaluesets

Discussions about CSEntry
Post Reply
zwan
Posts: 6
Joined: December 29th, 2013, 9:09 am

Dynamical use of setvaluesets

Post 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
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Dynamical use of setvaluesets

Post 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));
zwan
Posts: 6
Joined: December 29th, 2013, 9:09 am

Re: Dynamical use of setvaluesets

Post by zwan »

Oh yes! :lol: It works and still that's a weird behavior. :shock:
Post Reply