Setting field programatically

Discussions about CSEntry
Anne
Posts: 68
Joined: January 11th, 2012, 12:55 am

Setting field programatically

Postby Anne » February 11th, 2018, 2:08 am

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: 1541
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Setting field programatically

Postby josh » February 11th, 2018, 9:51 pm

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.


Return to “Entry”