
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] problems using a date widget
Thanks for your help...
here is what is actually happenning on the results page from the date widget
on the search page.
now...this is in the results page
[calc]
if ($CGI->{ui_begin_date}) {
for (qw/ ui_begin_date ui_end_date/) {
$CGI -> {$_} = $Tag->filter ( {
op => 'date_change',
body => $CGI -> {$_}
} );
}
$Scratch->{date_limit} = <<EOF
co=yes
sf=created
nu=1
op=<=
se=$CGI->{ui_begin_date}
sf=created
nu=1
op=>=
se=$CGI->{ui_end_date}
EOF
}
else {
$Scratch -> {date_limit}= "";
}
return;
[/calc]
and the same page query has...
<FORM ACTION="[area @@MV_PAGE@@]">
<SMALL><INPUT TYPE=text NAME=ui_text_qualification VALUE="">
[button text="Search for recipient"]
mv_nextpage=@@MV_PAGE@@
[/button]
</form>
</SMALL>
<!-- ----- Show the contact list box ----- -->
[if cgi ui_text_qualification]
<H4>Entries containing "[cgi ui_text_qualification]"</H3>
[/if]
<FORM ACTION="[process]">
<INPUT TYPE=hidden NAME=mv_nextpage VALUE="@@MV_PAGE@@">
<INPUT TYPE=hidden NAME=mv_todo VALUE=back>
[search-region more=1 search="
fi=catalogreq
ml=__UI_SZ_LIST_CUSTOMER__
md=1
st=db
[if scratch date_limit]
[scratch date_limit]
[elsif cgi ui_text_qualification]
se=[cgi ui_text_qualification]
[/elsif]
[else]
co=yes
sf=inactive
se=1
op=ne
[/else]
[/if]
[if cgi ui_sort_field]
tf=[cgi ui_sort_field]
to=[cgi ui_sort_option]
[else]
tf=0
[/else]
[/if]
[scratch start_at][set start_at][/set]
rf=code,institut,firstname,lastname,title,department,phone1,fax,address1,cit
y,state,zip,country,sourcecode,catalogqty,created
"]
the environmental variables being passed show
.
.
.
'mv_no_count' => '',
'mv_no_session_id' => '',
'active_img' => 'right.gif',
'order_style' => '1',
'date_limit' => 'co=yes
sf=created
nu=1
op=<=
se=20010916 <---from ui_start_date
sf=created
nu=1
op=>=
se=20011116 <---from ui_end_date
',
.
.
.
-----Original Message-----
From: interchange-users-admin@interchange.redhat.com
[mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of Mike
Heins
Sent: Thursday, November 15, 2001 2:01 PM
To: interchange-users@interchange.redhat.com
Subject: Re: [ic] problems using a date widget
Quoting Scott Andreas---Learning Services, Inc
(sandreas@learningservicesinc.com):
> I need to search for material based on date. So thusly I want to use the
> date widget to search for material within a date range.
>
> On the search page I have...
>
> <TR>
> <TD><B>Beginning<BR>
> [widget type=date NAME=ui_begin_date]</TD>
> <TD><B>Ending</B><BR>
> [widget type=date NAME=ui_end_date]</TD>
> </TR>
>
>
> on the result page I have...
With a problem like this, it is usually helpful to see what you get from
the input.
>
> [calc]
## I bet the error log will show values like
## begin=11^@/^@15^@/^@2001 end=11^@/^@16^@/^@2001
Log("begin=$CGI->{ui_begin_date end=$CGI->{ui_end_date}");
## So you ask, what good is date_widget? Do this:
for('ui_begin_date', 'ui_end_date') {
$CGI->{$_} = $Tag->filter('date_change', $CGI->{$_};
}
## Print then again
## begin=20011115 end=20011116
Log("begin=$CGI->{ui_begin_date end=$CGI->{ui_end_date}");
> if ($Session->{arg}) {
> $Scratch ->{date_limit} = "AND created like '$Session->{arg}%'";
> }
> elsif ($CGI->{ui_begin_date}) {
> for (qw/ ui_begin_date ui_end_date/) {
> $CGI -> {$_} = $Tag->filter ( {
> op => 'date_change',
> body => $CGI -> {$_}
> } );
> }
> $Scratch->{date_limit} = <<EOF
> AND created >= '$CGI->{ui_begin_date}'
> AND created <= '$CGI->{ui_end_date}Z'
> EOF
> }
> else {
> $Scratch -> {date_limit}= "";
> }
> return;
> [/calc]
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users