Setting field programatically
Posted: 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
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