OPAL problems with unassigned values in table frame fields

OPAL problems with unassigned values in table frame fields

Post by Zifkin Benjam » Sat, 30 Dec 1995 04:00:00

Greetings from Montreal
I am using PDOXWIN 1 and have a form with a one->many data model in which
the header, derived from the master table contains demographic info
including the primary key and in which the detail tables are represented
as table frames, one for each of several types of similar results (*
levels of different *) with some fields set to change colour if the
levels are too high and not otherwise. With the cursor in the primary key
field of the master table, scrolling goes from patient to patient, and
with the cursor in the date field of a detail table frame (one table
frame for each drug showing a single record of its table), scrolling goes
from one drug level result to another for the same drug in chronological
order for the same patient.

The problem is that different people take different combinations of
*, and so in scrolling from patient to patient, field values will be
(I imagine) unassigned in the table frames for * that someone doesnt
take. If the most recent result in a field was too high for a previous
patient, the colour will have been changed (to yellow) and will remain
that way with blank but yellow fields until a patient taking the drug and
with a normal value is encountered at which point the colour changes back
to normal as it should . This results in an ungainly patchwork much of
the time.

I have tried using DataArriveRecord in the action method of the primary
key to test for unassigned values of the result in the detail table and
if so, give them a value of zero and then do something like
 if druglevl.value=0 then
but this does not work and doesnt work in the NewValue method either.
Neither does anything attached to the druglevl field object's depart or
removeFocus methods, I guess because one is not calling them in a
scrolling operation and the field usually does not have focus anyway.
Similarly action/DataArriveRecord attached to the druglevl or date field
of a detail table doesnt work, I guess because the record giving the
problem is unassigned and there is thus no record upon which one arrives.

My apologies for the long post, but I would be grateful for any insight
into this.
Thank you in advance and season's greetings.

(Usual disclaimer)

Benjamin G. Zifkin,MD


OPAL problems with unassigned values in table frame fields

Post by Paul Brazie » Wed, 03 Jan 1996 04:00:00

Try this in the action method of the tableframe:

If {yourtest} and not {fieldname}.isblank()
   then {fieldname}.color=yellow
   else {fieldname}.color=transparent

I've tried it and it works for the first record or current record in the
tableframe which is fine if you have only one record showing!

I know this is unlikely to be any help to you but as nobody else had
replied I thought there was a chance somebody might see this tell us how
to make it work for each record.





OPAL problems with unassigned values in table frame fields

Post by GlenEBo » Wed, 03 Jan 1996 04:00:00

Quote:> Greetings from Montreal
> I am using PDOXWIN 1.

version 1.0?
Alright, first of all, version 5.0 isn't bullet proof, but 1.0
is downright full of holes!!!  Even if what you were trying to
accomplish was possible in Paradox, I guarantee that version 1.0
would fall on its face.  I've tried to do far simpler things in
table frames and had no luck, especially that far back...  
You've gotta get the latest verson, 7.0 if possible, and 5.0 at
the very least.  You'll enjoy a _huge_ improvement.

OK, with that ranting out of the way...
I have tried stuff like that before in Paradox with very poor
results.  I spend about 8 hours a day programming Paradox
(except when I'm surfing the net!), and would consider myself
pretty *good* at it, but what you are talking about I believe
may be impossible.  If you want each record on the frame to show
the colors they should have all the time, give up now!  I tried
to use a similar technique to hilight the entire current record
using 'Arrive' and 'Depart' at the record level, and no dice.  
The hilight would always get 'lost' and disapear or be on two
records at once.  Very unpredictable.  And it was worse in 4.5
and worse yet in 1.0...

The solution I found, which has been working without a flaw for
over a year on about 30 different forms is to make the table
frame transparent, then put a box behind it that is the shape of
the record object.  On the 'DataArriveRecord' action, move the
box the the coordinates of the current record.  And use a timer
to do it instead of actually moving it directly, otherwise it
will be _very_ slow.  If you put different colored boxes on the
hilighter, you could change the colors of the boxes depending on
what record was current.  Of course, this only gets your color
thing to work on the current record, and I know that isn't
perfect, but I think it may be your best bet.  Borland has been
bad about overlooking things like this.  What you want to do
ought to be very easy, I think, but not so.

Also, in regard to your comment about blank fields being
anassigned...They are, they are blank(), or equal to "".  If
they are numaric fields, they are treated as 0 as long as you
have executed 'BlankAsZero(True)'.

Well, anyway, you've got a tough problem, so good luck and all
that good stuff...

Glen E. Bob


OPAL problems with unassigned values in table frame fields

Post by Paul Brazie » Thu, 04 Jan 1996 04:00:00


In relation to your problem with keeping the current record highlighted,
I posted a query to this newsgroup sometime ago and was sent the
following code which is very straightforward and works very well for me.
Unfortunately I have no record of who posted the original so I cannot
give the credit which he deserves.

The code is attached to the action method of the record object.

method action(var eventInfo ActionEvent)
  case eventinfo.actionclass()=MoveAction :
  case eventinfo.id() = dataArriveRecord :
       if highlighted.isassigned()
          then highlighted.color = Transparent

Unfortunately this doesn't help Benjamin with his original problem.



1. Changing table frame table under OPAL

When you open a form you can change the table in it to a different table.
How do you do this under OPAL control?

In other words, I have  several files that all have the same structure and
I want to use one form to display each of them at a different time depending
on what the user wants to do.

2. Pagination - Forgot the modulu

3. problems with undefined values in fields with OPAL

4. Change MSDB sysjobsteps command data length

5. OPAL Question : Dynamic Reassignment of Table Frame Objects?

6. Size of XML data

7. OPAL/PdoxWin/Dynamic Assignment of Table Frames

8. NJ/NY Area - Database Administrators (Sybase, Oracle, DB2, Informix) needed now

9. Table frames linked to table frames in a report

10. OPAL - copying field values

11. frame-field frame-file

12. OPal: unable to select field from table

13. Hiding a field in a Table frame?