?
Solved

What's teh best way to do this?

Posted on 1998-06-09
4
Medium Priority
?
154 Views
Last Modified: 2012-05-04
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.
0
Comment
Question by:d4jaj1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
michaue earned 60 total points
ID: 1351828
1.  Put an extra field into the table to hold the ShowAgainTime, if I can call it that.  This will obviously be calculated and stored if the user enters that he wants to see the message again.
2.  Then put a filter, as a string which is assembled at run-time in your TTimer event, to hold the new time each passing minute.
3.  Then display only the message from the table which filtered.

Hope it works, and that I understood your question correctly ... :-}
0
 
LVL 3

Author Comment

by:d4jaj1
ID: 1351829
I think you understand what I'm trying to do, but I don't understand what you mean by using the filter. How would I keep track of the time while teh table is being filtered?  For example, suppose the filter contained records for today - what happens when the a new day comes (e.g., 12:01 am)?  Also, how would I display teh message again after 15 minutes? Sounds like I would need two timers.  There's has be to a more efficent way than multiple timers. Also, this table is already in production, so if I can do this without modifing the table - it would be best.  What about adding the values to a stringlist & checking it from there (can you have columns in a stringlist?)
0
 
LVL 1

Expert Comment

by:michaue
ID: 1351830
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
0
 
LVL 1

Expert Comment

by:michaue
ID: 1351831
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
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question