Source language: Translate to:

TextEntry Search

General questions about NeoBook

Moderator: Neosoft Support

Re: TextEntry Search

Postby Gaev » Wed Aug 17, 2016 4:58 pm

dixan:

But Now I have to change Apache for a combobox "<25/>25"

In the Selection Changed event section for Apache, setup two variables like so ...
Code: Select all
If "[Apache]" "=" "!<25"
   Setvar "[ApacheLT25]" "25"
   SetVar "[ApacheGT25]" ""
Else
   Setvar "[ApacheLT25]" ""
   SetVar "[ApacheGT25]" "25"
Endif

... and then add ...

- "ApacheLT25,ApacheGT25" to [campo]
- and "<,>" for corresponding values in [campotype]

Age var from TextEnry box to a combobox with a group of ages "17-30/31-45/46-60/61-75/>75"

Similarly, create variables [AgeLO] and [AgeHI] ... and populate them in the Selection Changed event section for Age ... by parsing [Age] usinf "!-" as the delimiter*** ... and then add ...

- "AgeLO,AgeHI" to [campo]
- and ">=,<=" for corresponding values in [campotype]

*** If user selects ''>75", set LO/HI variables to 76 and 200.
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: TextEntry Search

Postby Dixan » Wed Aug 17, 2016 8:59 pm

:?: OK, I crashed my bike against a very big Truck....

My DB is DBCC.dbf
I have a TextEntry Box in my form page named APACHE and with [DBCC.APACHE] var
I have a combo box in my Query page with [DBCCApache] var

In the "Selection Changed" of my combo box in the query page I wrote:
If "[DBCCApache]" "=" "!<25"
Setvar "[ApacheLT25]" "25"
SetVar "[ApacheGT25]" ""
Else
Setvar "[ApacheLT25]" ""
SetVar "[ApacheGT25]" "25"
Endif

and my search:

Strparse "NOMBRE.APELLIDOS.EDAD.SEXO.RAZA.HC.PROCED.TI.ApacheLT25,ApacheGT25" "." "[campo]" "[nc]"
strparse "!=.=.<=.=.=.=.=.=.<,>" "." "[campotype]" "[nct]"

But I got all numbers <25 and >25

What I did wrong?
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: TextEntry Search

Postby Gaev » Thu Aug 18, 2016 5:03 am

Dixan:

What I did wrong?

You are using the dot (decimal point) as your delimiter in ...
Code: Select all
Strparse "NOMBRE.APELLIDOS.EDAD.SEXO.RAZA.HC.PROCED.TI.ApacheLT25,ApacheGT25" "." "[campo]" "[nc]"

.. so why do you have comma separating ApacheLT25 and ApacheGT25 ?
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: TextEntry Search

Postby Dixan » Fri Aug 19, 2016 8:05 am

Sorry Gaev,
I did it, I changed the comma per dots and the same result, program shows me all data < and >.
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: TextEntry Search

Postby Gaev » Fri Aug 19, 2016 8:25 am

Dixan:

I changed the comma per dots and the same result, program shows me all data < and >.

1) did you also change comma to dot here ...
Code: Select all
strparse "!=.=.<=.=.=.=.=.=.<,>" "." "[campotype]" "[nct]"


2) post here the values (found by the Debugger) for ...

[DBCCApache]
[ApacheLT25]
[ApacheGT25]
[campo]
[campotype]
[filter]
User avatar
Gaev
 
Posts: 3736
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: TextEntry Search

Postby Dixan » Sun Nov 13, 2016 12:11 pm

Hi, I have a Sub called "Find"
In that sub I have this
StrParse "!=.=.<=.=.=.==.=.==.<=" "." "[campotype]" "[nct]"
Is there any posibility to make a provisional change in that StrParse from a botton for a particular search? something like
StrParse "!=.=.<=.=.=.==.=.==.>" "." "[campotype]" "[nct]"
Dix@n
User avatar
Dixan
 
Posts: 51
Joined: Sat May 14, 2016 2:48 pm

Re: TextEntry Search

Postby Neosoft Support » Fri Nov 18, 2016 6:29 pm

I'm not sure I understand your question, but you could use a variable as part of the StrParse action's first parameter. For example:

The subroutine:

StrParse "!=.=.<=.=.=.==.=.==.[ProvPart]" "." "[campotype]" "[nct]"

And in the button:

SetVar "[ProvPart]" ">"
GoSub...
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Previous

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests