understanding how define affects field initialized from temporary
Ohmes, Matt
Matt.Ohmes@COGNOS.com
Wed, 15 Dec 2004 18:57:05 -0500
Hi Lorry,
I don't really have the time to go too deeply into this right now (my
wife is expecting me to head home) but my advice is to not attempt to
use ENTRYMODE, APPENDMODE, etc in testing. The problem is that it may
only be true for a very limited amount of time and is rarely relevant to
what you want to accomplish. For example, ENTRYMODE is only true when
you are actually stepping through the ENTRY procedure; as soon as you
drop out of it, you may be in CORRECTMODE, CHANGEMODE, APPENDMODE
depending how the screen is set up.
Frankly, I've very seldom found "mode" to be relevant. About the only
thing I can remember being relevant to mode is that the record status
cannot be set to ALTEREDRECORD whey you are in FINDMODE even if you
procedurally change a record buffer value.
I almost universally checked record status instead. A classic example
is:
ITEM CreateDate Initial Sysdate
ITEM LastModDate Initial Sysdate
ITEM LastModDate Final Sysdate IF ALTEREDRECORD
(Forgive me if my syntax isn't exact, I haven't written PowerHouse code
in about 5 years.)
Note that I don't care what "mode" I was in when the record was
initialized or when I updated the record. I only care that new records
will have been initialized and that I want to change the LastModDate if
the record was altered (and therefore will be updated to the file).
I hope that helps.
Matt
-----Original Message-----
From: powerh-l-admin@lists.sowder.com
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Lorry Litman
Sent: Tuesday, December 14, 2004 2:36 PM
To: 'Pickering, John (NORBORD)'
Cc: PowerHouse listserver (E-mail)
Subject: RE: understanding how define affects field initialized from
temporary
Thank-you John for your reply but I will have to respectfully disagree
with
you on the define having no effect on emp_no being set to t_emp_no,
because
it does, I do agree with you that it shouldn't. Its the why which is
baffling me. From the example that I provided I indicated that if the
define
is not required to test for the value of the field emp_rpt_flag, emp_no
is
set fine, however, if the define is required to do the test of the value
of
emp_rpt_flag, emp_no doesn't get set. I was also surprised that "IF
ENTRYMODE" on the item initial statement seems to work in entrymode (E
in
the action field) but not in appendmode (A in the action field).
Anyway, I'm dropping this for now and will explore it later when I have
more
time to dissect, isolate and test the different scenarios.
Thank-you again to all who replied, your replies did help.
This list is a great help.
Thanx
Lorry
-----Original Message-----
This e-mail and/or any documents in this transmission is intended for
the address(s) only and may contain legally privileged or confidential
information. Any unauthorized use, disclosure, distribution, copying or
dissemination is strictly prohibited. If you receive this transmission
in error, please notify the sender immediately and return the original.
This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.