Você está na página 1de 3

Tips and Techniques

Synon User Group of the Americas


1993 Conference
EDTFIL that does not require F9 to toggle between add and change modes:
The Situation
Your user wants to be able see existing records in the ile to edit and to add new ones
without ha!ing to toggle with the F9 unction "e#$
The Solution
%odi# the deault EDTFIL screen design as ollows
&dd two hidden unction ields to the subile record context
'all the irst one (ld )ecord *#+n,-
(ld )ecord *#+n,- .ill be set to Y i the record is an existing record/ not to be
created
'all the second one 0rotect 1e# *#+n,-
0rotect 1e# *#+n,- .ill be set to indicate that the "e# should be 2rotected b#
dis2la#ing it as out2ut onl#$ This is onl# required i #ou are allowing the
"e# to be dis2la#ed as 2art o the subile$
%odi# the screen attributes *F34- o the 'om2an# code ield
'hange rom in2ut ca2able to out2ut onl# when )'D$0rotect "e# *#+n,- 5
'6D$YES
'hange the unction o2tions to turn o Delete and 'hange
%odi# the EDTFIL action diagram as ollows:
7SE):Initialise 2rogram
77&8EF) 9&DD 3:+3;+99
3<:=<:=3
%aintain 'om2an#
T#2e o2tions/ 2ress Enter$
;5Delete
, 'om2an# 'd 'om2an# 6ame
3:= >Y? 'om2an#
:=; &cme 8ar @ Arill
=== )o# Thom2son Ball
F=5Exit
Tips and Techniques
Synon User Group of the Americas
1993 Conference
0A%$90rogram mode 5 '6D$9&DD
7SE):Initialise subile header
.)1CFirst Time 5 '6D$YES
7SE):Initialise subile record *new record-
'&SE
.)1$First Time is Yes
)'D$'(m2an# 'ode 5 '(6$98lan"
.)1$First Time 5 '6D$6(
E6D'&SE
9Load the screen with existing records
)TD:'(m2an# rom &dd+'hg EDTFIL E 'om2an#
8 0(S 'om2an# 5 )'D$'om2an# 'ode
( %&0 'om2an# 6ame 5 )'D$'om2an# 6ame
( %&0 (ld )ecord*#+n,- 5 )'D$(ld )ecord *#+n,-
( %&0 0rotect 1e# *#+n,- 5 )'D$0rotect 1e# *#+n,-
7SE):0rocesss D8F record
'&SE
D83$'om2an# 'ode AT .)1$ L&ST )ecord )ead
0&)5D83 8# 6ame
9Set lag indicating this is an existing record
0&)$(ld )ecord *#+n,- 5 '6D$Yes
9Set lag indication that the "e# should be 2rotected
0&)$0rotect 1e# *#+n,- 5 '6D$Yes
9Sa!e last 'om2an# 'ode
.)1$Last record )ead 5 D83$'om2an# 'ode
FEEEE9G7IT
E6D'&SE
)e2lace the deault ')T(8H
')T: 'om2an# rom &dd+'Bg EDTFIL E 'om2an#
I 'om2an# 'ode 5 )'D$'om2an# 'ode
I 'om2an# 6ame 5 )'D$'om2an# 6ame
I Subile Selector 5 )'D$9SFLSEL
I (ld )ecord *#+n,- 5 )'D$(ld )ecord *#+n,-
( %&0 0rotect 1e# *#+n+- 5 )'D$ 0rotect 1e# *#+n,-
Tips and Techniques
Synon User Group of the Americas
1993 Conference
7SE): 0rocessing beore D8F 72date
'&SE
0&)$(ld )ecord *#+n,- Is Yes
9Do not create the record
0&)$0rotect 1e# *#+n,- 5 '6D$Yes
FEEEEE9G7IT
9(TBE).ISE
9Ao ahead and create the new record$
E6D'&SE
7SE):Extra 2rocessing aer D8F 72date
9handle the request to delete a record or change a record
'&SE
)'D$(ld )ecord *#+n+- is Yes
9Delete i the record was an existig record onl#
'&SE
)'D$9SFLSEL is 9Delete
Delete 'om2an# E 'om2an#
I 'om2an# 'ode 5 )'D$'om2an# 'ode
9(TBE).ISE
9The record should be u2date
'hange 'om2an# E 'om2an#
I 'om2an# 'ode 5 )'D$'om2an# 'ode
I 'om2an# 6ame 5)'D$'om2an# 6ame
E6D'&SE
9(TBE).ISE
9The record has alread# been created earlier
E6D'&SE
.)1$Last )ecord )ead 5 '(6$98lan"

Você também pode gostar