1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
3 &Scoped-define WINDOW-NAME CURRENT-WINDOW
4 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS V-table-Win
5 /*------------------------------------------------------------------------
6 ------------------------------------------------------------------------*/
10 /* *************************** Definitions
************************** */
12 /* Parameters Definitions
--- */
14 /* Local Variable Definitions
--- */
16 DEF VAR sub-li
AS CHAR NO-UNDO.
17 DEF VAR sub-sv
AS CHAR NO-UNDO.
18 DEF VAR sub-pd
AS CHAR NO-UNDO.
19 DEF VAR sub-all
AS LOGI
NO-UNDO.
20 DEF VAR list-delim
AS CHAR NO-UNDO INIT "~~".
21 DEF VAR entity-selection
AS CHAR NO-UNDO.
23 DEF VAR src-et
AS CHAR NO-UNDO INITIAL "".
24 DEF VAR src-esub
AS CHAR NO-UNDO INITIAL "".
27 DEF WORK-TABLE EntSel
NO-UNDO
28 FIELD EntityType
AS CHAR
29 FIELD SelectionID
AS CHAR
35 DEF VAR rec-src
AS HANDLE NO-UNDO.
37 /* _UIB-CODE-BLOCK-END
*/
41 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
43 /* ******************** Preprocessor Definitions
******************** */
45 &Scoped-define PROCEDURE-TYPE SmartViewer
47 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
49 /* Name of first Frame and
/or Browse and
/or first Query
*/
50 &Scoped-define FRAME-NAME F-Main
52 /* Standard List Definitions
*/
53 &Scoped-Define ENABLED-OBJECTS rad_etype cmb_esub tgl_Inactive tgl_all ~
54 sel_selection btn_ok btn_cancel
55 &Scoped-Define DISPLAYED-OBJECTS rad_etype cmb_esub tgl_Inactive tgl_all ~
58 /* Custom List Definitions
*/
59 /* ADM-CREATE-FIELDS
,ADM-ASSIGN-FIELDS
,List-3
,List-4
,List-5
,List-6
*/
61 /* _UIB-PREPROCESSOR-BLOCK-END
*/
65 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" V-table-Win _INLINE
66 /* Actions
: ? adm
/support
/keyedit.w ? ? ?
*/
74 **************************
75 * Set attributes related to FOREIGN
KEYS
77 RUN set-attribute-list
(
79 Keys-Supplied
= ""'
:U
).
80 /**************************
83 /* _UIB-CODE-BLOCK-END
*/
86 /* ************************ Function Prototypes
********************** */
88 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD retrieve-attribute V-table-Win
89 FUNCTION retrieve-attribute
RETURNS CHARACTER
90 ( INPUT selection-id
AS CHAR ) FORWARD.
92 /* _UIB-CODE-BLOCK-END
*/
96 /* *********************** Control Definitions
********************** */
99 /* Definitions of the field level widgets
*/
100 DEFINE BUTTON btn_cancel
108 DEFINE VARIABLE cmb_esub
AS CHARACTER FORMAT "X(256)":U
109 VIEW-AS COMBO-BOX SORT INNER-LINES 5
111 SIZE 36 BY 1 NO-UNDO.
113 DEFINE VARIABLE rad_etype
AS CHARACTER
114 VIEW-AS RADIO-SET HORIZONTAL
119 SIZE 37.72 BY 1 NO-UNDO.
121 DEFINE VARIABLE sel_selection
AS CHARACTER
122 VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
123 SIZE 54.29 BY 10.6 NO-UNDO.
125 DEFINE VARIABLE tgl_all
AS LOGICAL INITIAL no
128 SIZE 5.14 BY 1 NO-UNDO.
130 DEFINE VARIABLE tgl_Inactive
AS LOGICAL INITIAL no
133 SIZE 9.14 BY 1 NO-UNDO.
136 /* ************************ Frame Definitions
*********************** */
139 rad_etype
AT ROW 1 COL 11.29 NO-LABEL
140 cmb_esub
AT ROW 2 COL 1 NO-LABEL
141 tgl_Inactive
AT ROW 2 COL 38.14
142 tgl_all
AT ROW 2 COL 49.57
143 sel_selection
AT ROW 3 COL 1 NO-LABEL
144 btn_ok
AT ROW 13.8 COL 1.57
145 btn_cancel
AT ROW 13.8 COL 6.14
146 "Selection for:" VIEW-AS TEXT
147 SIZE 9.14 BY 1 AT ROW 1 COL 1.57
148 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
149 SIDE-LABELS NO-UNDERLINE THREE-D
150 AT COL 1 ROW 1 SCROLLABLE
154 /* *********************** Procedure Settings
************************ */
156 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
157 /* Settings for
THIS-PROCEDURE
159 Allow
: Basic
,DB-Fields
161 Add Fields to
: EXTERNAL-TABLES
162 Other Settings
: PERSISTENT-ONLY
COMPILE
165 /* This procedure should always be
RUN PERSISTENT. Report the error
, */
166 /* then cleanup and return.
*/
167 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
168 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
169 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
173 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
175 /* ************************* Create Window
************************** */
177 &ANALYZE-SUSPEND _CREATE-WINDOW
178 /* DESIGN Window definition
(used by the UIB
)
179 CREATE WINDOW V-table-Win
ASSIGN
182 /* END WINDOW DEFINITION
*/
187 /* *************** Runtime Attributes and UIB Settings
************** */
189 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
190 /* SETTINGS
FOR WINDOW V-table-Win
191 VISIBLE,,RUN-PERSISTENT
*/
192 /* SETTINGS
FOR FRAME F-Main
193 NOT-VISIBLE Size-to-Fit
*/
195 FRAME F-Main
:SCROLLABLE = FALSE
196 FRAME F-Main
:HIDDEN = TRUE.
198 /* SETTINGS
FOR COMBO-BOX cmb_esub
IN FRAME F-Main
200 /* _RUN-TIME-ATTRIBUTES-END
*/
204 /* Setting information for Queries and Browse Widgets fields
*/
206 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
207 /* Query rebuild information for
FRAME F-Main
210 */ /* FRAME F-Main
*/
216 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
217 /* ************************* Included-Libraries
*********************** */
219 {src
/adm
/method
/viewer.i
}
220 {inc
/method
/m-mntvwr.i
}
223 /* _UIB-CODE-BLOCK-END
*/
229 /* ************************ Control Triggers
************************ */
231 &Scoped-define SELF-NAME btn_cancel
232 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_cancel V-table-Win
233 ON CHOOSE OF btn_cancel
IN FRAME F-Main
/* Cancel
*/
238 /* _UIB-CODE-BLOCK-END
*/
242 &Scoped-define SELF-NAME btn_ok
243 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_ok V-table-Win
244 ON CHOOSE OF btn_ok
IN FRAME F-Main
/* OK */
249 /* _UIB-CODE-BLOCK-END
*/
253 &Scoped-define SELF-NAME cmb_esub
254 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_esub V-table-Win
255 ON VALUE-CHANGED
OF cmb_esub
IN FRAME F-Main
257 RUN get-selection
( ?
, ?
).
260 /* _UIB-CODE-BLOCK-END
*/
264 &Scoped-define SELF-NAME rad_etype
265 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL rad_etype V-table-Win
266 ON VALUE-CHANGED
OF rad_etype
IN FRAME F-Main
268 RUN entity-type-changed.
271 /* _UIB-CODE-BLOCK-END
*/
275 &Scoped-define SELF-NAME sel_selection
276 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL sel_selection V-table-Win
277 ON VALUE-CHANGED
OF sel_selection
IN FRAME F-Main
279 IF AVAILABLE EntSel
THEN EntSel.SV
= SELF:SCREEN-VALUE.
282 /* _UIB-CODE-BLOCK-END
*/
286 &Scoped-define SELF-NAME tgl_all
287 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_all V-table-Win
288 ON VALUE-CHANGED
OF tgl_all
IN FRAME F-Main
/* All
*/
293 /* _UIB-CODE-BLOCK-END
*/
297 &Scoped-define SELF-NAME tgl_Inactive
298 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_Inactive V-table-Win
299 ON VALUE-CHANGED
OF tgl_Inactive
IN FRAME F-Main
/* Inactives
*/
301 ASSIGN FRAME {&FRAME-NAME} tgl_Inactive .
303 RUN get-selection
( ?
, ?
).
306 /* _UIB-CODE-BLOCK-END
*/
312 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
315 /* *************************** Main Block
*************************** */
317 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
318 RUN dispatch
IN THIS-PROCEDURE ('initialize'
:U
).
321 /************************ INTERNAL PROCEDURES
********************/
323 /* _UIB-CODE-BLOCK-END
*/
327 /* ********************** Internal Procedures
*********************** */
329 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
330 PROCEDURE adm-row-available
:
331 /*------------------------------------------------------------------------------
332 Purpose
: Dispatched to this procedure when the Record-
333 Source has a new row available. This procedure
334 tries to get the new row
(or foriegn keys
) from
335 the Record-Source and process it.
337 ------------------------------------------------------------------------------*/
339 /* Define variables needed by this internal procedure.
*/
340 {src
/adm
/template
/row-head.i
}
342 /* Process the newly available records
(i.e. display fields
,
343 open queries
, and
/or pass records on to any RECORD-TARGETS
).
*/
344 {src
/adm
/template
/row-end.i
}
348 /* _UIB-CODE-BLOCK-END
*/
352 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE all-changed V-table-Win
353 PROCEDURE all-changed
:
354 /*------------------------------------------------------------------------------
358 ------------------------------------------------------------------------------*/
360 DO WITH FRAME {&FRAME-NAME}:
361 IF AVAILABLE EntSel
THEN EntSel.SelAll
= INPUT tgl_all.
362 sel_selection
:SENSITIVE = NOT INPUT tgl_all.
367 /* _UIB-CODE-BLOCK-END
*/
371 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE cancel-changes V-table-Win
372 PROCEDURE cancel-changes
:
373 /*------------------------------------------------------------------------------
377 ------------------------------------------------------------------------------*/
379 RUN dispatch
( 'exit'
:u
).
383 /* _UIB-CODE-BLOCK-END
*/
387 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE confirm-changes V-table-Win
388 PROCEDURE confirm-changes
:
389 /*------------------------------------------------------------------------------
393 ------------------------------------------------------------------------------*/
395 DO WITH FRAME {&FRAME-NAME}:
397 DEF VAR i
AS INT NO-UNDO.
399 FIND FIRST EntSel
WHERE EntSel.EntityType
= INPUT rad_etype
400 AND EntSel.SelectionID
= REPLACE(INPUT cmb_esub
, " ", "-")
402 IF NOT AVAILABLE(EntSel
) THEN DO:
403 MESSAGE INPUT rad_etype
SKIP INPUT cmb_esub .
405 MESSAGE EntSel.EntityType EntSel.SelectionID .
409 entity-selection
= EntSel.EntityType
+ "," + INPUT cmb_esub.
410 IF EntSel.SelALL
THEN
411 entity-selection
= entity-selection
+ ",ALL".
412 ELSE DO i
= 1 TO NUM-ENTRIES( EntSel.SV
, list-delim
):
413 entity-selection
= entity-selection
+ ","
414 + ENTRY( LOOKUP( ENTRY( i
, EntSel.SV
, list-delim
), EntSel.LI
, list-delim
), EntSel.PD
).
418 RUN update-entity-selection
IN rec-src
( entity-selection
) NO-ERROR.
419 RUN dispatch
( 'exit'
:U
).
425 /* _UIB-CODE-BLOCK-END
*/
429 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
430 PROCEDURE disable_UI
:
431 /*------------------------------------------------------------------------------
432 Purpose
: DISABLE the User Interface
434 Notes
: Here we clean-up the user-interface by deleting
435 dynamic widgets we have created and
/or hide
436 frames. This procedure is usually called when
437 we are ready to
"clean-up" after running.
438 ------------------------------------------------------------------------------*/
439 /* Hide all frames.
*/
441 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
444 /* _UIB-CODE-BLOCK-END
*/
448 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE entity-type-changed V-table-Win
449 PROCEDURE entity-type-changed
:
450 /*------------------------------------------------------------------------------
454 ------------------------------------------------------------------------------*/
456 DEF VAR entity-type
AS CHAR NO-UNDO.
457 DEF VAR i
AS INT NO-UNDO.
458 DEF VAR id-list
AS CHAR NO-UNDO.
459 DEF VAR proc-id
AS CHAR NO-UNDO.
460 DEF VAR ie
AS CHAR NO-UNDO.
461 DEF VAR proc-entry
AS CHAR NO-UNDO.
463 ie
= THIS-PROCEDURE:INTERNAL-ENTRIES.
464 entity-type
= INPUT FRAME {&FRAME-NAME} rad_etype.
466 DO i
= 1 TO NUM-ENTRIES( ie
):
467 proc-entry
= ENTRY( i
, ie
).
468 IF ENTRY( 1, proc-entry
, '
-'
) = 'get'
AND
469 ENTRY( NUM-ENTRIES( proc-entry
, '
-'
), proc-entry
, '
-'
) = entity-type
THEN
471 proc-id
= REPLACE( SUBSTR( proc-entry
, 5 ), "-" + entity-type
, "" ).
472 proc-id
= REPLACE( proc-id
, '
-'
, ' '
).
473 add-to-list
( id-list
, proc-id
).
477 cmb_esub
:LIST-ITEMS IN FRAME {&FRAME-NAME} = id-list.
479 IF src-et
= entity-type
AND cmb_esub
:LOOKUP(src-esub
) > 0 THEN
480 cmb_esub
:SCREEN-VALUE = src-esub.
482 cmb_esub
:SCREEN-VALUE = cmb_esub
:ENTRY(1).
484 RUN get-selection
( entity-type
, REPLACE( cmb_esub
:SCREEN-VALUE, " ", "-" ) ).
488 /* _UIB-CODE-BLOCK-END
*/
492 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Companies-L V-table-Win
493 PROCEDURE get-Companies-L
:
494 /*------------------------------------------------------------------------------
498 ------------------------------------------------------------------------------*/
500 FOR EACH Company
WHERE Company.Active
OR tgl_Inactive
502 add-to-list-delim
( sub-li
, STRING( Company.CompanyCode
, "9999" ) + " - " + Company.LegalName
, list-delim
).
503 add-to-list
( sub-pd
, STRING( Company.CompanyCode
) ).
508 /* _UIB-CODE-BLOCK-END
*/
512 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Portfolios-P V-table-Win
513 PROCEDURE get-Portfolios-P
:
514 /*------------------------------------------------------------------------------
518 ------------------------------------------------------------------------------*/
520 FOR EACH Property
WHERE Property.Active
OR tgl_Inactive
521 NO-LOCK BREAK BY Property.Manager
:
523 IF FIRST-OF( Property.Manager
) THEN
525 FIND Person
WHERE Person.PersonCode
= Property.Manager
NO-LOCK NO-ERROR.
526 add-to-list-delim
( sub-li
, IF AVAILABLE Person
527 THEN TRIM( Person.FirstName
+ ' '
+ Person.LastName
)
528 ELSE 'Not in a Portfolio'
, list-delim
).
529 add-to-list
( sub-pd
, STRING( Property.Administrator
) ).
536 /* _UIB-CODE-BLOCK-END
*/
540 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Projects-J V-table-Win
541 PROCEDURE get-Projects-J
:
542 /*------------------------------------------------------------------------------
546 ------------------------------------------------------------------------------*/
548 FOR EACH Project
NO-LOCK:
549 add-to-list-delim
( sub-li
, STRING( Project.ProjectCode
, "99999" ) + " - " + Project.Name
, list-delim
).
550 add-to-list
( sub-pd
, STRING( Project.ProjectCode
) ).
555 /* _UIB-CODE-BLOCK-END
*/
559 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Properties-P V-table-Win
560 PROCEDURE get-Properties-P
:
561 /*------------------------------------------------------------------------------
565 ------------------------------------------------------------------------------*/
567 FOR EACH Property
WHERE Property.Active
OR tgl_Inactive
569 add-to-list-delim
( sub-li
, STRING( Property.PropertyCode
, "99999" ) + " - " + ( IF Property.Name
= ?
THEN "?" ELSE Property.Name
), list-delim
).
570 add-to-list
( sub-pd
, STRING( Property.PropertyCode
) ).
575 /* _UIB-CODE-BLOCK-END
*/
579 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Property-Managers-P V-table-Win
580 PROCEDURE get-Property-Managers-P
:
581 /*------------------------------------------------------------------------------
585 ------------------------------------------------------------------------------*/
587 FOR EACH Property
WHERE Property.Active
OR tgl_Inactive
588 NO-LOCK BREAK BY Property.Administrator
:
590 IF FIRST-OF( Property.Administrator
) THEN DO:
591 FIND Person
WHERE Person.PersonCode
= Property.Administrator
NO-LOCK NO-ERROR.
592 add-to-list-delim
( sub-li
, IF AVAILABLE Person
593 THEN TRIM( Person.FirstName
+ ' '
+ Person.LastName
)
594 ELSE 'Not managed'
, list-delim
).
595 add-to-list
( sub-pd
, STRING( Property.Administrator
) ).
602 /* _UIB-CODE-BLOCK-END
*/
606 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-rec-src V-table-Win
607 PROCEDURE get-rec-src
:
608 /*------------------------------------------------------------------------------
612 ------------------------------------------------------------------------------*/
614 DEF VAR c-rec-src
AS CHAR NO-UNDO.
616 IF VALID-HANDLE( rec-src
) THEN RETURN.
617 RUN get-link-handle
IN adm-broker-hdl
( THIS-PROCEDURE, 'RECORD-SOURCE'
, OUTPUT c-rec-src
).
618 ASSIGN rec-src
= WIDGET-HANDLE( c-rec-src
) NO-ERROR.
622 /* _UIB-CODE-BLOCK-END
*/
626 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-Regions-P V-table-Win
627 PROCEDURE get-Regions-P
:
628 /*------------------------------------------------------------------------------
632 ------------------------------------------------------------------------------*/
634 FOR EACH Region
NO-LOCK:
635 add-to-list-delim
( sub-li
, Region.Region
+ " - " + Region.Name
, list-delim
).
636 add-to-list
( sub-pd
, Region.Region
).
641 /* _UIB-CODE-BLOCK-END
*/
645 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-selection V-table-Win
646 PROCEDURE get-selection
:
647 /*------------------------------------------------------------------------------
651 ------------------------------------------------------------------------------*/
652 DEF INPUT PARAMETER entity-type
AS CHAR NO-UNDO.
653 DEF INPUT PARAMETER selection-id
AS CHAR NO-UNDO.
655 DO WITH FRAME {&FRAME-NAME}:
657 IF entity-type
= ?
THEN entity-type
= INPUT rad_etype.
658 IF selection-id
= ?
THEN selection-id
= REPLACE( cmb_esub
:SCREEN-VALUE, " ", "-" ).
660 FIND FIRST EntSel
WHERE EntSel.EntityType
= entity-type
661 AND EntSel.SelectionID
= selection-id
NO-ERROR.
663 IF NOT AVAILABLE EntSel
THEN DO:
664 sub-sv
= "". sub-pd
= "". sub-li
= "". sub-all
= No.
665 RUN VALUE( "get-" + selection-id
+ "-" + entity-type
) IN THIS-PROCEDURE NO-ERROR.
666 IF NOT ERROR-STATUS:ERROR THEN DO:
667 RUN get-sv
( selection-id
).
670 EntSel.EntityType
= entity-type
671 EntSel.SelectionID
= selection-id
675 EntSel.SelAll
= sub-all.
679 sel_selection
:DELIMITER = list-delim.
680 sel_selection
:LIST-ITEMS = EntSel.LI.
681 sel_selection
:PRIVATE-DATA = EntSel.PD.
682 sel_selection
:SCREEN-VALUE = EntSel.SV.
683 tgl_all
:SCREEN-VALUE = STRING( EntSel.SelAll
).
691 /* _UIB-CODE-BLOCK-END
*/
695 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-sv V-table-Win
697 /*------------------------------------------------------------------------------
701 ------------------------------------------------------------------------------*/
702 DEF INPUT PARAMETER selection-id
AS CHAR NO-UNDO.
704 DEF VAR options
AS CHAR NO-UNDO.
705 DEF VAR option-id
AS CHAR NO-UNDO.
706 DEF VAR option-et
AS CHAR NO-UNDO.
707 DEF VAR option-val
AS CHAR NO-UNDO.
708 DEF VAR option-idx
AS INT NO-UNDO.
709 DEF VAR i
AS INT NO-UNDO.
710 DEF VAR found
AS LOGI
NO-UNDO INIT No.
714 option-et
= ENTRY( 1, entity-selection
).
715 options
= SUBSTRING( entity-selection
, LENGTH(option-et
) + 2 ).
717 option-id
= ENTRY( 1, options
).
718 found
= (REPLACE(option-id
, " ", "-") = selection-id
).
719 IF NOT found
THEN RETURN.
721 options
= SUBSTRING( options
, LENGTH(option-id
) + 2 ).
722 sub-all
= options
= "ALL".
723 IF sub-all
THEN RETURN.
725 DO i
= 1 TO NUM-ENTRIES( options
):
726 option-val
= ENTRY( i
, options
).
727 option-idx
= LOOKUP( option-val
, sub-pd
).
728 IF option-idx
> 0 THEN add-to-list-delim
( sub-sv
, ENTRY( option-idx
, sub-li
, list-delim
), list-delim
).
733 /* _UIB-CODE-BLOCK-END
*/
737 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-display-fields V-table-Win
738 PROCEDURE inst-display-fields
:
739 /*------------------------------------------------------------------------------
743 ------------------------------------------------------------------------------*/
745 RUN entity-type-changed.
749 /* _UIB-CODE-BLOCK-END
*/
753 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-destroy V-table-Win
754 PROCEDURE pre-destroy
:
755 /*------------------------------------------------------------------------------
759 ------------------------------------------------------------------------------*/
761 IF LAST-EVENT:FUNCTION = "WINDOW-CLOSE" THEN RUN cancel-changes.
765 /* _UIB-CODE-BLOCK-END
*/
769 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-initialize V-table-Win
770 PROCEDURE pre-initialize
:
771 /*------------------------------------------------------------------------------
775 ------------------------------------------------------------------------------*/
777 RUN retrieve-entities.
781 /* _UIB-CODE-BLOCK-END
*/
785 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE retrieve-entities V-table-Win
786 PROCEDURE retrieve-entities
:
787 /*------------------------------------------------------------------------------
788 Purpose
: Get the entity desctiption string from the record source.
791 ------------------------------------------------------------------------------*/
793 RUN send-entity-selection
IN rec-src
( OUTPUT entity-selection
) NO-ERROR.
795 src-et
= ENTRY( 1, entity-selection
).
796 IF NUM-ENTRIES( entity-selection
) > 1 THEN
797 src-esub
= ENTRY( 2, entity-selection
).
799 IF TRIM(src-et
) <> "" THEN DO:
801 DISPLAY rad_etype
WITH FRAME {&FRAME-NAME}.
806 /* _UIB-CODE-BLOCK-END
*/
810 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
811 PROCEDURE send-records
:
812 /*------------------------------------------------------------------------------
813 Purpose
: Send record
ROWID's for all tables used by
815 Parameters
: see template
/snd-head.i
816 ------------------------------------------------------------------------------*/
818 /* SEND-RECORDS does nothing because there are no External
819 Tables specified for this SmartViewer
, and there are no
820 tables specified in any contained Browse
, Query
, or Frame.
*/
824 /* _UIB-CODE-BLOCK-END
*/
828 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
829 PROCEDURE state-changed
:
830 /* -----------------------------------------------------------
834 -------------------------------------------------------------*/
835 DEFINE INPUT PARAMETER p-issuer-hdl
AS HANDLE NO-UNDO.
836 DEFINE INPUT PARAMETER p-state
AS CHARACTER NO-UNDO.
839 /* Object instance CASEs can go here to replace standard behavior
841 {src
/adm
/template
/vstates.i
}
845 /* _UIB-CODE-BLOCK-END
*/
849 /* ************************ Function Implementations
***************** */
851 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION retrieve-attribute V-table-Win
852 FUNCTION retrieve-attribute
RETURNS CHARACTER
853 ( INPUT selection-id
AS CHAR ) :
854 /*------------------------------------------------------------------------------
857 ------------------------------------------------------------------------------*/
862 /* _UIB-CODE-BLOCK-END
*/