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?
Assisted coding not working
Assisted coding not working
- Attachments
-
- DataEntry.zip
- (371.94 KiB) Downloaded 223 times
-
- Posts: 1804
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Assisted coding not working
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));
include(LU_OCCUPATION) where pos(toupper(strip($)),toupper(LU_OCCUPATION));