Setting field programatically

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Setting field programatically

Post by Anne »

This is so weird: It's something that I've done tons of times and never had problems with before.. And now I don see why it does not work:

I use a external dictionary to read data that I want to fill into my application, then I want to put this data into some of my fields, say like this:

LF_NORTH = NORTH; //variables prefixed with LF are from the external dictionary
LF_EAST = EAST;

numeric lc = loadcase(mydict, LF_NORTH, LF_EAST)

if lc then
MY_FIELD = LF_DATA;
errmsg("Testing values. MY_FIELD has value: %d while LF_DATA has value: %d", MY_FIELD, LF_DATA);
skip to NEXT_FIELD;
else
errmsg("Not found");
endif;

What happens is that MY_FIELD is filled in with data and it all looks OK, but the errmsg shows that MY_FIELD has value notappl.

What on earth am I doing wrong?

Anne
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Setting field programatically

Post by josh »

Are you in system controlled mode? If so then the value of all dictionary variables will be notappl until you reach the postproc of the variable. You can use visualvalue() to see the value that is displayed on the screen.
Post Reply