EDIT procedure for fields in cluster?
Joe Boyle
atla38 at dsl.pipex.com
Thu Aug 11 07:44:52 CDT 2005
what happens if you code as below, maybe the error message has to go in the
edit proc to get correct reprompting ?
procedure input extra-numeric of parameters
begin
if fieldtext = "" and fieldx = 0
; or if 0.5 lt (size(trunk(fieldtext))
then let fieldtext = "0"
end
procedure edit extra-numeric of parameters
begin
if fieldvalue = 0
then error "Cannot use ZERO..."
end
Regards, Joe.
-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
roger32909 at bellsouth.net
Sent: 11 August 2005 13:24
To: Murray Scholz
Cc: powerh-l at lists.sowder.com
Subject: Re: Re: EDIT procedure for fields in cluster?
Nothing we have tried prevents user from skipping a date field that is 2nd
or more beyond the first field on a cluster line.
If we put REQUIRED, we get:
"*W* The operator can skip this or other required fields on the same
record." The VALUES option is likewise ignored.
If we put an ERROR message in an INPUT procedure, to be sure the ERROR
message is displayed, but the screen is then locked with no further prompt
for the date. If we put a WARNING message in an INPUT procedure, to be sure
the WARNING message is displayed, the zero from the Enter/return is
accepted, and the prompt goes to the next field on the line.
If we put a silent field after the date, we received a message that "This
field must be a date," but the screen is then again locked with no further
prompt for the date.
Yes, if the user does enter something in the field, the EDIT procedure does
then execute.
Apparently the only solution is to test this field in a PREUPDATE procedure
to prevent updating of zero in a date field.
>
> From: Murray Scholz <murray.scholz at abri.une.edu.au>
> Date: 2005/08/09 Tue AM 02:11:48 EDT
> To: roger32909 at bellsouth.net
> CC: powerh-l at lists.sowder.com
> Subject: Re: EDIT procedure for fields in cluster?
>
>
> Have tried it here (vms and 710G1) , and seems to invoke edit procedure
all OK.. see this
> little example, which works just fine for both fields
>
> screen aaa
> file parameters occurs 19 times
> title " Lst-Used Lst-Used Extra" at 2,1
> title " Key Number Num Date Numeric Description
Other-Info" at 3,1
> draw 4,1 to 4,80
> skip to 5
> align (1,,4) (,,10) (,,20) (,,29) (,,42) (,,62)
> cluster occurs with parameters
> FIELD PARAM-KEY OF PARAMETERS
> FIELD LAST-USED-NUM OF PARAMETERS
> FIELD LAST-USED-NUM-DATE OF PARAMETERS
> FIELD EXTRA-NUMERIC OF PARAMETERS
> FIELD PARAM-DESCRIPT OF PARAMETERS for 1,19
> FIELD OTHER-INFO OF PARAMETERS for 1,18
> cluster
> ;-------------------------------------
> procedure edit last-used-num of parameters
> begin
> if last-used-num of parameters = 0
> then error "Cannot use ZERO..."
> end
> ;-------------------------------------
> procedure edit extra-numeric of parameters
> begin
> if extra-numeric of parameters = 0
> then error "Cannot use ZERO..."
> end
> ;--------------------------------------
> build
>
> Don't forget, that the edit procedure is only invoked if the user actually
enters some data
> into the field (ie. if the just skip through the field, , probably leaving
the data-item with
> value zero, then the edit procedure does NOT get invoked.)
>
> There are a number of ways around this, eg. making the field required , or
even resorting to
> something like...
> procedure input fieldx
> begin
> if fieldtext = "" and fieldx = 0
> then let fieldtext = "0"
> end
>
> which will force the processing into the edit procedure.
>
> Regards
> Murray Scholz
> Agricultural Business Research Institute
> University of New England
> Armidale NSW 2351 Australia
> Email murray.scholz at abri.une.edu.au
>
> roger32909 at bellsouth.net wrote:
>
> > PH 7.10G on OpenVMS.
> > We have a screen with a cluster of some nine fields arrayed
horizontally, e.g.
> >
> > Field1 Field2 Field3, etc.
> > 09
> > 10
> > 11
> > 12
> >
> > We are trying to prevent entries of zero for date and quantity fields.
> > However, it appears that an EDIT procedure only works for Field1. EDIT
procedures for subsequent fields appear to have no effect for one can easily
enter zero and continue. Of course, we can test for this in a PREUPDATE
procedure, but we would like to give immediate feedback to the user. Is
there something special that needs to be coded in EDIT procedures for fields
in a cluster without their own ID?
> >
>
>
>
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
More information about the powerh-l
mailing list