On Fri, Feb 13, 2009 at 8:45 PM, Linly <[email protected]> wrote:
>
> Yes Martin, you are right. But it's the problem that I've not solve
> yet.
>
> I want to drop out the overdue item from the info report. But I'm
> still struggled with Dan's hint(about "[if more {now} {info.time::
> {+p}}]...[if]"). Before that I have to delete the value in info.* to
> exclude the overdue item. But I don't want loose the date information
> about the event. So I save that info to two place.
>
> It's really stupid, I know. If I can figure out how to drive out the
> overdue items ... but Idon't know how to write the
> "if=****************" part here:
>
> =======The info report======================
> [(info report if=**************** target=info.ezreminder sort=value
> template=ezreminder)]
> =======================================
This should work, however, I failed to note that you are not saving
your time value as a timestamp. You are saving it already formatted so
of course you will get unexpected results comparing %Y/%m/%d and
{now}.
So change it to:
[(info report if="more {(time {now} %Y/%m/%d)}
{info.ezreminder::{+p}}" target=info.ezreminder sort=value
template=ezreminder)]
Or more easily,
[(info report if="more {now} {info.ezreminder::{+p}}"
target=info.ezreminder sort=value template=ezreminder)]
and then save your form like this:
=======The form======================
[form]
[text time size=20] (Deadline Here)
[text js=1 title size=35 " Appointment Here... "]
[submit ok]
[session target {p}.#]
[session create]
[session savedata time,title]
[session info "field='{=target}' value='{=time}'
target='info.ezreminder'"]
[form]
===================================
This will allow you to enter in any deadline date, like +3 days or
2009/05/01 7:00 p.m., or whatever, and it will be automatically
converted to a timestamp, which will be more easily comparable with
{now}. The other advantage is you can take a timestamp and display it
in any format you want. And you can sort not only by days but by time
of day when there are multiple appointments on a given day.
Cheers,
Dan
P.S. Hope this gets you a step further.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---