PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
HFilter considerations
HFilter considerations
Started by guillermo, Sep., 19 2005 7:14 AM - 4 replies
Connect yourself…
guillermo
#1
Posted on September, 19 2005 - 7:14 AM
Hi Forum...
If I use HFilter(Documentos,Fecha_de_ingreso,vl_FVI,vl_FVF)all is ok
vl_FVI nad vl_FVF are date
But if I use ....
MyFilter = "Documentos.Fecha_de_ingreso >= " + vl_FVI " and Documentos.Fecha_de_ingreso <= " + vl_FVF
HFilter(Documentos,My_Filter)
or simply
MyFilter = "Documentos.Fecha_de_ingreso = " + vl_FVI
HFilter(Documentos,My_Filter)
No display records in table
any consideration to work with dates ?
Thanks .....
Guillermo
Report
0
0
Francisco J. Acedo M.
#2
Posted on September, 19 2005 - 1:58 PM
Hola Gullermo,¨
La única cosa que tienes mal es que la fecha debes considerarla un campo
string, por lo tanto debe ir entre comillas sencillas. En el ejemplo que te
escribió Al se refleja esto.
Si quieres asignarle un valor a una fecha puedes ponerlo fecha = "20050911"
(equivalente a decir fecha = today().
Saludos,
"guillermo" <glsaavedra@adinet.com.uy> escribió en el mensaje
news:432e8e24$3@news.pcsoft.fr...
Hi Al
Ok, I will see what you suggest me.
Guillermo
G'day Guillermo
The syntax for Hfilter is quite bizarre and not intuitive. The original
Hfilter command has been augmented with HfilterIdentical,
HfilterIncludeBetween and HfilterStartsWith.
The HfilterIncludeBetween may be better to use in your circumstance and
the additional commands are more straightforward to construct than
Hfilter().
Hfilter will not return an error if it's syntax is wrong, you just won't
get any data so you do need to check the result string that it gives.
The best way to learn how to build conditional strings for hfilter() is to
use the Hcreateview() wizard as the conditional string that it builds can
be used in the Hfilter() command. In fact Hcreateview() can be used as a
replacement method to Hfilter() when extracting data.
The other function to have a look at is HBuildKey()
Try this string in your filter - use the field names without the filename.
prefix
MyFilter = "Fecha_de_ingreso >= " + "'vl_FVI +'" and Fecha_de_ingreso <=
"' + vl_FVF+"'"
or
MyFilter = "Fecha_de_ingreso >= " + vl_FVI +" and Fecha_de_ingreso <= "' +
vl_FVF+"'"
I have retyped these parts with spaces as it can be confusing with double
and single quote marks
+" ' vl_FVI + ' "
The last is " ' "
Regards
Al
Report
0
0
Al
#3
Posted on September, 19 2005 - 2:31 PM
G'day Guillermo
The syntax for Hfilter is quite bizarre and not intuitive. The original Hfilter command has been augmented with HfilterIdentical, HfilterIncludeBetween and HfilterStartsWith.
The HfilterIncludeBetween may be better to use in your circumstance and the additional commands are more straightforward to construct than Hfilter().
Hfilter will not return an error if it's syntax is wrong, you just won't get any data so you do need to check the result string that it gives.
The best way to learn how to build conditional strings for hfilter() is to use the Hcreateview() wizard as the conditional string that it builds can be used in the Hfilter() command. In fact Hcreateview() can be used as a replacement method to Hfilter() when extracting data.
The other function to have a look at is HBuildKey()
Try this string in your filter - use the field names without the filename. prefix
MyFilter = "Fecha_de_ingreso >= " + "'vl_FVI +'" and Fecha_de_ingreso <= "' + vl_FVF+"'"
or
MyFilter = "Fecha_de_ingreso >= " + vl_FVI +" and Fecha_de_ingreso <= "' + vl_FVF+"'"
I have retyped these parts with spaces as it can be confusing with double and single quote marks
+" ' vl_FVI + ' "
The last is " ' "
Regards
Al
Report
0
0
guillermo
#4
Posted on September, 19 2005 - 3:21 PM
Hi Al
Ok, I will see what you suggest me.
Guillermo
G'day Guillermo
The syntax for Hfilter is quite bizarre and not intuitive. The original Hfilter command has been augmented with HfilterIdentical, HfilterIncludeBetween and HfilterStartsWith.
The HfilterIncludeBetween may be better to use in your circumstance and the additional commands are more straightforward to construct than Hfilter().
Hfilter will not return an error if it's syntax is wrong, you just won't get any data so you do need to check the result string that it gives.
The best way to learn how to build conditional strings for hfilter() is to use the Hcreateview() wizard as the conditional string that it builds can be used in the Hfilter() command. In fact Hcreateview() can be used as a replacement method to Hfilter() when extracting data.
The other function to have a look at is HBuildKey()
Try this string in your filter - use the field names without the filename. prefix
MyFilter = "Fecha_de_ingreso >= " + "'vl_FVI +'" and Fecha_de_ingreso <= "' + vl_FVF+"'"
or
MyFilter = "Fecha_de_ingreso >= " + vl_FVI +" and Fecha_de_ingreso <= "' + vl_FVF+"'"
I have retyped these parts with spaces as it can be confusing with double and single quote marks
+" ' vl_FVI + ' "
The last is " ' "
Regards
Al
Report
0
0
guillermo
#5
Posted on September, 20 2005 - 5:48 AM
Thanks to your help, it worked perfectly
Guillermo
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text