Hello All,
I am having an issue with a form of ours. When users make a choice from a drop down list (tied to a document variable), delete out the value and then click on another form element, CPS will crash with the following error:
Error occurred in class , method EditField::onKillFocus
There are a couple of threads in the forum regarding this error or something like it, but I haven't found any kind of definite answer. Has anyone had experience with this?
Thanks,
Brad
Is that document variable tied to a watcher expression? Any chance you have an OBSNOW with a blank obs term name somewhere in the code?
I have seen this before with an edit field that is tied to a visibility region.
Is the edit field on your form inside of a visibility region?
Thanks,
Terrence Goggans
There is a visibility region tied to a drop down. The reason for the visibility is we want data entered in sequential order on the form. So drop down one always displays, then for drop down two we have a visibility that looks like:
DOCUMENT.GROUP1 <> "" OR DOCUMENT.GROUP2 <> ""
The second part DOCUMENT.GROUP2 <> "" is in the event the user enters a value in drop down one and two and then removes the value in drop down one, drop down two will still show.
I looked for the issues that David described but did not find anything. The other thing to note, the data in the drop downs is an updating problem list. For example, let's assume the patient has this on their problem list: Asthma, Cough, Influenza.
If the user picks Cough, the subsequent drop downs would show: Asthma, Influenza and so on until the list would be blank if the problem list is short enough. Since I couldn't find the issue in the MEL trace, I opted to rewrite the function that was generating the list data since it was in a related part of the form. (Also we have had this bit of code for a long time and I thought I could write it a little bit more efficiently.) The function rewrite seems to have fixed the issue, but I am still testing out the change since I couldn't see definitively from the trace see what the underlying issue was.
Gotcha. I can reproduce this issue any time that I have my cursor in an edit field that is tied to a visibility that gets hidden when I leave the edit field by tabbing and clicking on another field. I didn't start seeing this until happen after 12.3.
- Terrence Goggans