Page 3 of 3

Re: TextEntry Search

PostPosted: Wed Aug 17, 2016 4:58 pm
by Gaev
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.

Re: TextEntry Search

PostPosted: Wed Aug 17, 2016 8:59 pm
by Dixan
:?: 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?

Re: TextEntry Search

PostPosted: Thu Aug 18, 2016 5:03 am
by Gaev
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 ?

Re: TextEntry Search

PostPosted: Fri Aug 19, 2016 8:05 am
by Dixan
Sorry Gaev,
I did it, I changed the comma per dots and the same result, program shows me all data < and >.

Re: TextEntry Search

PostPosted: Fri Aug 19, 2016 8:25 am
by Gaev
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]

Re: TextEntry Search

PostPosted: Sun Nov 13, 2016 12:11 pm
by Dixan
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]"

Re: TextEntry Search

PostPosted: Fri Nov 18, 2016 6:29 pm
by Neosoft Support
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...