selcase returning always true

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

selcase returning always true

Post by AriSilva »

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
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: selcase returning always true

Post by AriSilva »

I forgot to ask:
Is there a way to avoid showing the key in the selcase list?
Best
Ari
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: selcase returning always true

Post by sherrell »

Hi Ari,

The continual return of '1' is definitely a bug. Greg talked about it here and a way around it (which is basically suppressing the use of HTML for dialogs):

viewtopic.php?f=1&t=5122&p=15999&hilit=selcase#p15999

It has been fixed for 7.7.3, so it's just a matter of when that gets released.

As for suppressing the key field, I'm not aware of any options, but maybe it's something easy for Greg/Savy to do.

Stay tuned,
Sherrell
Post Reply