1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
8 /*------------------------------------------------------------------------
12 Description
: from VIEWER.W
- Template for SmartViewer Objects
20 ------------------------------------------------------------------------*/
21 /* This .W file was created with the Progress UIB.
*/
22 /*----------------------------------------------------------------------*/
24 /* Create an unnamed pool to store all the widgets created
25 by this procedure. This is a good default which assures
26 that this procedure's triggers and internal procedures
27 will execute in this procedure's storage
, and that proper
28 cleanup will occur on deletion of the procedure.
*/
32 /* *************************** Definitions
************************** */
34 /* Parameters Definitions
--- */
36 /* Local Variable Definitions
--- */
38 DEF VAR mode
AS CHAR NO-UNDO.
39 DEF BUFFER FaxDetail
FOR PhoneDetail.
40 DEF BUFFER MobDetail
FOR PhoneDetail.
42 /* _UIB-CODE-BLOCK-END
*/
46 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
48 /* ******************** Preprocessor Definitions
******************** */
50 &Scoped-define PROCEDURE-TYPE SmartViewer
52 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
54 /* Name of first Frame and
/or Browse and
/or first Query
*/
55 &Scoped-define FRAME-NAME F-Main
58 &Scoped-define EXTERNAL-TABLES Guarantor
59 &Scoped-define FIRST-EXTERNAL-TABLE Guarantor
62 /* Need to scope the external tables to this procedure
*/
63 DEFINE QUERY external_tables
FOR Guarantor.
64 /* Standard List Definitions
*/
65 &Scoped-Define ENABLED-FIELDS Guarantor.Limit
66 &Scoped-define FIELD-PAIRS~
67 ~
{&FP1}Limit ~{&FP2}Limit ~{&FP3}
68 &Scoped-define ENABLED-TABLES Guarantor
69 &Scoped-define FIRST-ENABLED-TABLE Guarantor
70 &Scoped-Define ENABLED-OBJECTS RECT-1 RECT-2 cmb_Type loc_FirstName ~
71 loc_LastName loc_Company edt_address loc_City loc_state loc_Country loc_Zip ~
72 loc_Mobile loc_Expires
73 &Scoped-Define DISPLAYED-FIELDS Guarantor.Limit
74 &Scoped-Define DISPLAYED-OBJECTS cmb_Type loc_FirstName loc_LastName ~
75 loc_Company edt_address loc_City loc_state loc_Country loc_Zip loc_Phone ~
76 loc_Fax loc_Mobile loc_Expires
78 /* Custom List Definitions
*/
79 /* ADM-CREATE-FIELDS
,ADM-ASSIGN-FIELDS
,List-3
,List-4
,List-5
,List-6
*/
81 /* _UIB-PREPROCESSOR-BLOCK-END
*/
86 /* *********************** Control Definitions
********************** */
89 /* Definitions of the field level widgets
*/
90 DEFINE VARIABLE cmb_Type
AS CHARACTER FORMAT "X(20)"
92 VIEW-AS COMBO-BOX INNER-LINES 10
93 LIST-ITEMS "B - Bank Guarantee","S - Security Deposit","I - Individual","C - Company"
96 DEFINE VARIABLE edt_address
AS CHARACTER
97 VIEW-AS EDITOR SCROLLBAR-VERTICAL
98 SIZE 33.14 BY 4.2 NO-UNDO.
100 DEFINE VARIABLE loc_City
AS CHARACTER FORMAT "X(30)"
106 DEFINE VARIABLE loc_Company
AS CHARACTER FORMAT "X(256)":U
109 SIZE 63.43 BY 1 NO-UNDO.
111 DEFINE VARIABLE loc_Country
AS CHARACTER FORMAT "X(30)"
117 DEFINE VARIABLE loc_Expires
AS DATE FORMAT "99/99/9999":U
120 SIZE 10.29 BY 1 NO-UNDO.
122 DEFINE VARIABLE loc_Fax
AS CHARACTER FORMAT "X(256)":U
125 SIZE 20 BY 1 NO-UNDO.
127 DEFINE VARIABLE loc_FirstName
AS CHARACTER FORMAT "X(256)":U
130 SIZE 25 BY 1 NO-UNDO.
132 DEFINE VARIABLE loc_LastName
AS CHARACTER FORMAT "X(256)":U
135 SIZE 25 BY 1 NO-UNDO.
137 DEFINE VARIABLE loc_Mobile
AS CHARACTER FORMAT "X(256)":U
140 SIZE 20 BY 1 NO-UNDO.
142 DEFINE VARIABLE loc_Phone
AS CHARACTER FORMAT "X(256)":U
145 SIZE 20 BY 1 NO-UNDO.
147 DEFINE VARIABLE loc_state
AS CHARACTER FORMAT "X(15)"
153 DEFINE VARIABLE loc_Zip
AS CHARACTER FORMAT "X(20)"
159 DEFINE RECTANGLE RECT-1
160 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
163 DEFINE RECTANGLE RECT-2
164 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
168 /* ************************ Frame Definitions
*********************** */
171 Guarantor.Limit
AT ROW 1.4 COL 11 COLON-ALIGNED
174 cmb_Type
AT ROW 1.4 COL 34.43
175 loc_FirstName
AT ROW 4 COL 11 COLON-ALIGNED
176 loc_LastName
AT ROW 4 COL 49.29 COLON-ALIGNED
177 loc_Company
AT ROW 5.4 COL 11 COLON-ALIGNED
178 edt_address
AT ROW 6.8 COL 13 NO-LABEL
179 loc_City
AT ROW 6.8 COL 54.43 COLON-ALIGNED
180 loc_state
AT ROW 7.8 COL 54.43 COLON-ALIGNED
181 loc_Country
AT ROW 8.8 COL 54.43 COLON-ALIGNED
182 loc_Zip
AT ROW 9.8 COL 54.43 COLON-ALIGNED
183 loc_Phone
AT ROW 11.5 COL 11 COLON-ALIGNED
184 loc_Fax
AT ROW 11.5 COL 54.43 COLON-ALIGNED
185 loc_Mobile
AT ROW 12.5 COL 11 COLON-ALIGNED
186 loc_Expires
AT ROW 12.6 COL 54.43 COLON-ALIGNED
187 RECT-1
AT ROW 1 COL 1
188 "Contact Details" VIEW-AS TEXT
189 SIZE 15.43 BY 1 AT ROW 2.6 COL 3.86
191 RECT-2
AT ROW 3 COL 2.14
192 "Address:" VIEW-AS TEXT
193 SIZE 6.29 BY 1 AT ROW 6.4 COL 5.57
195 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
196 SIDE-LABELS NO-UNDERLINE THREE-D
197 AT COL 1 ROW 1 SCROLLABLE
201 /* *********************** Procedure Settings
************************ */
203 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
204 /* Settings for
THIS-PROCEDURE
206 External Tables
: ttpl.Guarantor
207 Allow
: Basic
,DB-Fields
209 Add Fields to
: EXTERNAL-TABLES
210 Other Settings
: PERSISTENT-ONLY
COMPILE
213 /* This procedure should always be
RUN PERSISTENT. Report the error
, */
214 /* then cleanup and return.
*/
215 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
216 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
217 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
221 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
223 /* ************************* Create Window
************************** */
225 &ANALYZE-SUSPEND _CREATE-WINDOW
226 /* DESIGN Window definition
(used by the UIB
)
227 CREATE WINDOW V-table-Win
ASSIGN
230 /* END WINDOW DEFINITION
*/
235 /* *************** Runtime Attributes and UIB Settings
************** */
237 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
238 /* SETTINGS
FOR WINDOW V-table-Win
239 VISIBLE,,RUN-PERSISTENT
*/
240 /* SETTINGS
FOR FRAME F-Main
241 NOT-VISIBLE Size-to-Fit
*/
243 FRAME F-Main
:SCROLLABLE = FALSE
244 FRAME F-Main
:HIDDEN = TRUE.
246 /* SETTINGS
FOR COMBO-BOX cmb_Type
IN FRAME F-Main
249 edt_address
:RETURN-INSERTED IN FRAME F-Main
= TRUE.
251 /* SETTINGS
FOR FILL-IN loc_Fax
IN FRAME F-Main
253 /* SETTINGS
FOR FILL-IN loc_Phone
IN FRAME F-Main
255 /* _RUN-TIME-ATTRIBUTES-END
*/
259 /* Setting information for Queries and Browse Widgets fields
*/
261 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
262 /* Query rebuild information for
FRAME F-Main
265 */ /* FRAME F-Main
*/
271 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
272 /* ************************* Included-Libraries
*********************** */
274 {src
/adm
/method
/viewer.i
}
275 {inc
/method
/m-mntvwr.i
}
277 /* _UIB-CODE-BLOCK-END
*/
282 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
285 /* *************************** Main Block
*************************** */
287 /* _UIB-CODE-BLOCK-END
*/
291 /* ********************** Internal Procedures
*********************** */
293 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
294 PROCEDURE adm-row-available
:
295 /*------------------------------------------------------------------------------
296 Purpose
: Dispatched to this procedure when the Record-
297 Source has a new row available. This procedure
298 tries to get the new row
(or foriegn keys
) from
299 the Record-Source and process it.
301 ------------------------------------------------------------------------------*/
303 /* Define variables needed by this internal procedure.
*/
304 {src
/adm
/template
/row-head.i
}
306 /* Create a list of all the tables that we need to get.
*/
307 {src
/adm
/template
/row-list.i
"Guarantor"}
309 /* Get the record
ROWID's from the RECORD-SOURCE.
*/
310 {src
/adm
/template
/row-get.i
}
312 /* FIND each record specified by the RECORD-SOURCE.
*/
313 {src
/adm
/template
/row-find.i
"Guarantor"}
315 /* Process the newly available records
(i.e. display fields
,
316 open queries
, and
/or pass records on to any RECORD-TARGETS
).
*/
317 {src
/adm
/template
/row-end.i
}
321 /* _UIB-CODE-BLOCK-END
*/
325 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE cancel-changes V-table-Win
326 PROCEDURE cancel-changes
:
327 /*------------------------------------------------------------------------------
331 ------------------------------------------------------------------------------*/
333 RUN notify
( 'hide
, CONTAINER-SOURCE'
:U
).
334 IF mode
= "Add" THEN RUN delete-guarantor.
ELSE RUN check-modified
( "CLEAR" ).
335 RUN dispatch
( 'exit'
:U
).
339 /* _UIB-CODE-BLOCK-END
*/
343 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE confirm-changes V-table-Win
344 PROCEDURE confirm-changes
:
345 /*------------------------------------------------------------------------------
349 ------------------------------------------------------------------------------*/
351 RUN verify-guarantor.
352 IF RETURN-VALUE = "FAIL" THEN RETURN.
354 RUN notify
( 'hide
, CONTAINER-SOURCE'
:U
).
355 IF mode
= "Add" THEN RUN notify
( 'open-query
,record-source'
:U
).
356 RUN dispatch
( 'update-record'
:U
).
357 RUN dispatch
( 'exit'
:U
).
361 /* _UIB-CODE-BLOCK-END
*/
365 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE delete-guarantor V-table-Win
366 PROCEDURE delete-guarantor
:
367 /*------------------------------------------------------------------------------
371 ------------------------------------------------------------------------------*/
373 FIND CURRENT Guarantor
EXCLUSIVE-LOCK NO-ERROR.
374 IF AVAILABLE Guarantor
THEN DELETE Guarantor.
376 FIND CURRENT Person
EXCLUSIVE-LOCK NO-ERROR.
377 IF AVAILABLE Person
THEN DELETE Person.
379 FIND CURRENT PostalDetail
EXCLUSIVE-LOCK NO-ERROR.
380 IF AVAILABLE PostalDetail
THEN DELETE PostalDetail.
382 FIND CURRENT PhoneDetail
EXCLUSIVE-LOCK NO-ERROR.
383 IF AVAILABLE PhoneDetail
THEN DELETE PhoneDetail.
385 FIND CURRENT FaxDetail
EXCLUSIVE-LOCK NO-ERROR.
386 IF AVAILABLE FaxDetail
THEN DELETE FaxDetail.
390 /* _UIB-CODE-BLOCK-END
*/
394 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
395 PROCEDURE disable_UI
:
396 /*------------------------------------------------------------------------------
397 Purpose
: DISABLE the User Interface
399 Notes
: Here we clean-up the user-interface by deleting
400 dynamic widgets we have created and
/or hide
401 frames. This procedure is usually called when
402 we are ready to
"clean-up" after running.
403 ------------------------------------------------------------------------------*/
404 /* Hide all frames.
*/
406 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
409 /* _UIB-CODE-BLOCK-END
*/
413 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-contact-details V-table-Win
414 PROCEDURE get-contact-details
:
415 /*------------------------------------------------------------------------------
419 ------------------------------------------------------------------------------*/
421 IF NOT AVAILABLE Guarantor
THEN RETURN.
423 FIND FIRST Person
WHERE Person.PersonCode
= Guarantor.PersonCode
NO-ERROR.
425 IF NOT AVAILABLE Person
THEN
430 Contact.PersonCode
= Person.PersonCode
431 Contact.ContactType
= 'GTOR'
432 Guarantor.PersonCode
= Person.PersonCode.
435 FIND FIRST PostalDetail
WHERE PostalDetail.PersonCode
= Person.PersonCode
436 AND PostalDetail.PostalType
= 'MAIN'
NO-ERROR.
438 IF NOT AVAILABLE PostalDetail
THEN
442 PostalDetail.PersonCode
= Person.PersonCode
443 PostalDetail.PostalType
= 'MAIN'.
446 FIND FIRST PhoneDetail
WHERE PhoneDetail.PersonCode
= Guarantor.PersonCode
447 AND PhoneDetail.PhoneType
= "BUS" NO-ERROR.
449 IF NOT AVAILABLE PhoneDetail
THEN
453 PhoneDetail.PhoneType
= 'BUS'
454 PhoneDetail.PersonCode
= Person.PersonCode.
457 FIND FIRST FaxDetail
WHERE FaxDetail.PersonCode
= Guarantor.PersonCode
458 AND FaxDetail.PhoneType
= "FAX" NO-ERROR.
460 IF NOT AVAILABLE FaxDetail
THEN
464 FaxDetail.PhoneType
= 'FAX'
465 FaxDetail.PersonCode
= Person.PersonCode.
468 FIND FIRST MobDetail
WHERE MobDetail.PersonCode
= Guarantor.PersonCode
469 AND MobDetail.PhoneType
= "Mob" NO-ERROR.
471 IF NOT AVAILABLE MobDetail
THEN
475 MobDetail.PhoneType
= 'MOB'
476 MobDetail.PersonCode
= Person.PersonCode.
481 /* _UIB-CODE-BLOCK-END
*/
485 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-assign-statement V-table-Win
486 PROCEDURE inst-assign-statement
:
487 /*------------------------------------------------------------------------------
491 ------------------------------------------------------------------------------*/
493 ASSIGN FRAME {&FRAME-NAME}
496 loc_City loc_State loc_Country loc_Zip
497 loc_Phone loc_Fax loc_Mobile
498 loc_FirstName loc_LastName loc_Company
502 Guarantor.Type
= SUBSTR( cmb_Type
, 1, 1 )
503 PostalDetail.Address
= edt_Address
504 PostalDetail.City
= loc_City
505 PostalDetail.State
= loc_State
506 PostalDetail.Country
= loc_Country
507 PostalDetail.Zip
= loc_Zip
508 PhoneDetail.Number
= loc_Phone
509 FaxDetail.Number
= loc_Fax
510 MobDetail.Number
= loc_Mobile
511 Person.FirstName
= loc_FirstName
512 Person.LastName
= loc_LastName
513 Person.Company
= loc_Company
514 Guarantor.AnyData
= "Expiry," + STRING(loc_Expires
, "99/99/9999").
519 /* _UIB-CODE-BLOCK-END
*/
523 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-display-fields V-table-Win
524 PROCEDURE inst-display-fields
:
525 /*------------------------------------------------------------------------------
527 ------------------------------------------------------------------------------*/
528 IF NOT AVAILABLE(Guarantor
) THEN RETURN.
530 IF mode
= "Maintain" THEN RUN get-contact-details.
533 IF Guarantor.Type
= "I" THEN "I - Individual" ELSE
534 IF Guarantor.Type
= "B" THEN "B - Bank Guarantee" ELSE
535 IF Guarantor.Type
= "S" THEN "S - Security Deposit" ELSE
536 IF Guarantor.Type
= "C" THEN "C - Company" ELSE "".
538 ASSIGN edt_Address
= PostalDetail.Address.
540 IF NUM-ENTRIES( Guarantor.AnyData
) > 1 THEN
541 loc_Expires
= DATE( ENTRY( 2, Guarantor.AnyData
) ).
547 PostalDetail.City @ loc_City
548 PostalDetail.State @ loc_State
549 PostalDetail.Country @ loc_Country
550 PostalDetail.Zip @ loc_Zip
551 PhoneDetail.Number @ loc_Phone
552 FaxDetail.Number @ loc_Fax
553 MobDetail.Number @ loc_Mobile
554 Person.FirstName @ loc_FirstName
555 Person.LastName @ loc_LastName
556 Person.Company @ loc_Company
557 WITH FRAME {&FRAME-NAME}.
561 /* _UIB-CODE-BLOCK-END
*/
565 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-enable-fields V-table-Win
566 PROCEDURE inst-enable-fields
:
567 /*------------------------------------------------------------------------------
571 ------------------------------------------------------------------------------*/
575 loc_City loc_State loc_Country loc_Zip
576 loc_Phone loc_Fax loc_Mobile
577 loc_FirstName loc_LastName loc_Company
578 WITH FRAME {&FRAME-NAME}.
582 /* _UIB-CODE-BLOCK-END
*/
586 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-initialize V-table-Win
587 PROCEDURE inst-initialize
:
588 /*------------------------------------------------------------------------------
590 ------------------------------------------------------------------------------*/
592 IF mode
= "Add" THEN RUN dispatch
( 'add-record'
:U
).
593 ELSE RUN dispatch
( 'enable-fields'
).
597 /* _UIB-CODE-BLOCK-END
*/
601 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE override-add-record V-table-Win
602 PROCEDURE override-add-record
:
603 /*------------------------------------------------------------------------------
607 ------------------------------------------------------------------------------*/
609 DEF VAR c-recsrc
AS CHAR NO-UNDO.
610 DEF VAR rowid-list
AS CHAR NO-UNDO.
612 RUN get-link-handle
IN adm-broker-hdl
( THIS-PROCEDURE, 'RECORD-SOURCE'
:U
, OUTPUT c-recsrc
).
613 RUN send-records
IN WIDGET-HANDLE( c-recsrc
) ( "TenancyLease", OUTPUT rowid-list
).
614 FIND TenancyLease
WHERE ROWID( TenancyLease
) = TO-ROWID( rowid-list
) NO-LOCK.
617 RUN get-contact-details.
619 Guarantor.TenancyLeaseCode
= TenancyLease.TenancyLeaseCode
620 Guarantor.Type
= "I".
622 CURRENT-WINDOW:TITLE = "Adding a Guarantor to Lease " +
623 STRING( TenancyLease.TenancyLeaseCode
).
625 RUN dispatch
( 'display-fields'
).
626 RUN dispatch
( 'enable-fields'
).
630 /* _UIB-CODE-BLOCK-END
*/
634 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-destroy V-table-Win
635 PROCEDURE pre-destroy
:
636 /*------------------------------------------------------------------------------
640 ------------------------------------------------------------------------------*/
642 IF LAST-EVENT:FUNCTION = "WINDOW-CLOSE" THEN RUN cancel-changes.
646 /* _UIB-CODE-BLOCK-END
*/
650 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-row-available V-table-Win
651 PROCEDURE pre-row-available
:
652 /*------------------------------------------------------------------------------
657 ------------------------------------------------------------------------------*/
659 IF mode
= "Add" THEN have-records
= Yes.
663 /* _UIB-CODE-BLOCK-END
*/
667 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
668 PROCEDURE send-records
:
669 /*------------------------------------------------------------------------------
670 Purpose
: Send record
ROWID's for all tables used by
672 Parameters
: see template
/snd-head.i
673 ------------------------------------------------------------------------------*/
675 /* Define variables needed by this internal procedure.
*/
676 {src
/adm
/template
/snd-head.i
}
678 /* For each requested table
, put it's
ROWID in the output list.
*/
679 {src
/adm
/template
/snd-list.i
"Guarantor"}
681 /* Deal with any unexpected table requests before closing.
*/
682 {src
/adm
/template
/snd-end.i
}
686 /* _UIB-CODE-BLOCK-END
*/
690 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
691 PROCEDURE state-changed
:
692 /* -----------------------------------------------------------
696 -------------------------------------------------------------*/
697 DEFINE INPUT PARAMETER p-issuer-hdl
AS HANDLE NO-UNDO.
698 DEFINE INPUT PARAMETER p-state
AS CHARACTER NO-UNDO.
701 /* Object instance CASEs can go here to replace standard behavior
703 {src
/adm
/template
/vstates.i
}
707 /* _UIB-CODE-BLOCK-END
*/
711 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-Mode V-table-Win
713 /*------------------------------------------------------------------------------
714 Purpose
: Called when the mode attribute is set.
715 ------------------------------------------------------------------------------*/
716 DEF INPUT PARAMETER new-mode
AS CHAR NO-UNDO.
722 /* _UIB-CODE-BLOCK-END
*/
726 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE verify-guarantor V-table-Win
727 PROCEDURE verify-guarantor
:
728 /*------------------------------------------------------------------------------
732 ------------------------------------------------------------------------------*/
734 DO WITH FRAME {&FRAME-NAME}:
736 DEF VAR g-type
AS CHAR NO-UNDO.
737 g-type
= SUBSTR( INPUT cmb_Type
, 1, 1 ).
741 ( INPUT loc_FirstName
= "" OR
742 INPUT loc_LastName
= "" ) THEN
744 MESSAGE "Individuals must have a first and a last name."
745 VIEW-AS ALERT-BOX ERROR.
746 IF INPUT loc_FirstName
= "" THEN APPLY '
ENTRY'
:U
TO loc_FirstName.
747 IF INPUT loc_LastName
= "" THEN APPLY '
ENTRY'
:U
TO loc_LastName.
750 ELSE IF g-type
= "C" AND INPUT loc_Company
= "" THEN
752 MESSAGE "Companies must have a company name."
753 VIEW-AS ALERT-BOX ERROR.
754 APPLY '
ENTRY'
:U
TO loc_Company.
762 /* _UIB-CODE-BLOCK-END
*/