selcase returning always true
Posted: July 26th, 2022, 9:47 am
Hi folks,
I´m using the selcase to choose from a specific case in a file. The instrucction is the following:
ret = selcase(PB_EDUCA_SUP_05_AMOSTRA_NIVSUP_DICT, z) include(AM11_PESSOA_NOME)
where pos(strip(y), AM11_PESSOA_NOME) = 1; //z contais the typed letters
When I type a couple of letters (or a single one), the prompt shows the names that match the letters, but...
If I do not want any and click in the "X" below the box, or even if I click in the "X" at the top right corner to close the prompt, the select returns 1, even if I did not select any case.
The only time the select returns a false is where there is no case in the file that matches the typed letters.
I´ve tried clearing the dict before calling the select to see if I could check the fileds, but apparently the select fills the fileds with the selected case or with the first case that does not match.
The question is: what do I have to do to exit this selcase without selecting any case, and knowing that?
Best
Ari
ps. I´m using 7.7.2, the new selcase prompt is a little bit different from the help and the previous versions
I´m using the selcase to choose from a specific case in a file. The instrucction is the following:
ret = selcase(PB_EDUCA_SUP_05_AMOSTRA_NIVSUP_DICT, z) include(AM11_PESSOA_NOME)
where pos(strip(y), AM11_PESSOA_NOME) = 1; //z contais the typed letters
When I type a couple of letters (or a single one), the prompt shows the names that match the letters, but...
If I do not want any and click in the "X" below the box, or even if I click in the "X" at the top right corner to close the prompt, the select returns 1, even if I did not select any case.
The only time the select returns a false is where there is no case in the file that matches the typed letters.
I´ve tried clearing the dict before calling the select to see if I could check the fileds, but apparently the select fills the fileds with the selected case or with the first case that does not match.
The question is: what do I have to do to exit this selcase without selecting any case, and knowing that?
Best
Ari
ps. I´m using 7.7.2, the new selcase prompt is a little bit different from the help and the previous versions