d4jaj1
asked on
What's teh best way to do this?
Hello,
I'm creating a reminders system, in which I've stored the date an time in a
Paradox TimeStamp field called "Date". There is also a logical field
(called Shown) in the table that will keep track of whether the user wants
to see the reminder again after it is displayed. I'd like to do three
things,
1) Display a message when the date & time in the timestamp filed equals Now
(or less than now if "Shown" equals False)
2) Re-display the message in 15 minutes if the user want's to continue to
be reminded. (without changing the value in the Date field if possible).
I know I can use TTimer to check if the data in the timestamp field equals
Now, but suppose I have 20 reminders in the table. It would be very
inefficient scroll through the table every time the OnTimer event kicked
off.
Maybe adding the Date field's data (where Shown = False AND where Date <=
Today) to a StringField at startup, then check the contents through the
OnTimer event??? Don't know if that made nay sense so any suggestions would
be helpful.
Thanks.
I'm creating a reminders system, in which I've stored the date an time in a
Paradox TimeStamp field called "Date". There is also a logical field
(called Shown) in the table that will keep track of whether the user wants
to see the reminder again after it is displayed. I'd like to do three
things,
1) Display a message when the date & time in the timestamp filed equals Now
(or less than now if "Shown" equals False)
2) Re-display the message in 15 minutes if the user want's to continue to
be reminded. (without changing the value in the Date field if possible).
I know I can use TTimer to check if the data in the timestamp field equals
Now, but suppose I have 20 reminders in the table. It would be very
inefficient scroll through the table every time the OnTimer event kicked
off.
Maybe adding the Date field's data (where Shown = False AND where Date <=
Today) to a StringField at startup, then check the contents through the
OnTimer event??? Don't know if that made nay sense so any suggestions would
be helpful.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok, maybe I can help you ...
I suppose you have a primary key on the table. Create another table with the primary key from the other one as the primary key again and add two fields ShowAgainDate and ShowAgainTime. Set your TTimer to check each minute and within it set a filter on you TTable for your second table on the current date for the ShowAgainDate and the current time for the ShowAgainTime. Then reference table one with the key fields you get from the filter to show the relevant messages. You can remove records from the second table when the first table ShowAgain flag is false etc.
Do you know how to set a filter on a TTable at runtime???
I'm not sure if I'm very clear in my answer, but please feel free to bother me until we have sorted this out for you (AND WE WILL!!)
Have fun ... Elfrieda
I suppose you have a primary key on the table. Create another table with the primary key from the other one as the primary key again and add two fields ShowAgainDate and ShowAgainTime. Set your TTimer to check each minute and within it set a filter on you TTable for your second table on the current date for the ShowAgainDate and the current time for the ShowAgainTime. Then reference table one with the key fields you get from the filter to show the relevant messages. You can remove records from the second table when the first table ShowAgain flag is false etc.
Do you know how to set a filter on a TTable at runtime???
I'm not sure if I'm very clear in my answer, but please feel free to bother me until we have sorted this out for you (AND WE WILL!!)
Have fun ... Elfrieda
Oops, I forgot to mention that you have to put a check into the TTimer event along with all the other stuff to update the ShowAgainDate on the second table if you enter a new day. But that shouldn't be to much of a problem ...
Elfrieda
Elfrieda
ASKER