Page 1 of 1

Assisted coding not working

Posted: February 21st, 2019, 11:13 pm
by Don
I created a computer assisted coding app based on the examples and it worked. However, we needed to change the coding scheme from ISCO to BARSOC. I created a new data dictionary where the only change was in the name of the ID variable from LU_ISCO_CODE to LU_BARSOC_CODE. I made the corresponding changes in the code and the app can tell a correct code from an incorrect one, but the code lookup does not work.

I attached my app. If you run DataEntry and press enter at a blank field, it will take you to the lookup screen. Typing something like Software Developers should return a code of 2512, but instead nothing happens. It worked fine before when I was using the old occupation codes. Also the lookup stopped working for industry codes as well even though no changes were made to them.

How would I be able to troubleshoot this?

Re: Assisted coding not working

Posted: February 22nd, 2019, 8:39 am
by Gregory Martin
The pos function is case sensitive. Make both things you're checking against either lower or uppercase. I changed your code to this and it worked fine for me:
Sel = selcase(OCCUPATION_CODES_DICT,"")
    include(LU_OCCUPATION) where pos(toupper(strip($)),toupper(LU_OCCUPATION));