1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win
8 /*------------------------------------------------------------------------
12 Description
: from BROWSER.W
- Basic SmartBrowser Object Template
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 current-triggers
AS CHAR FORMAT "X(3)" LABEL "Currently" NO-UNDO.
39 DEF VAR df-name
AS CHAR NO-UNDO INIT "rplctn\reptrig.df".
41 /* _UIB-CODE-BLOCK-END
*/
45 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
47 /* ******************** Preprocessor Definitions
******************** */
49 &Scoped-define PROCEDURE-TYPE SmartBrowser
51 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
53 /* Name of first Frame and
/or Browse and
/or first Query
*/
54 &Scoped-define FRAME-NAME F-Main
55 &Scoped-define BROWSE-NAME br_table
57 /* Internal Tables
(found by Frame
, Query
& Browse Queries) */
58 &Scoped-define INTERNAL-TABLES ReplTrigger
60 /* Define KEY-PHRASE in case it is used by any query.
*/
61 &Scoped-define KEY-PHRASE TRUE
63 /* Definitions for
BROWSE br_table
*/
64 &Scoped-define FIELDS-IN-QUERY-br_table ReplTrigger.TableToRepl ~
65 ReplTrigger.Activity current-triggers @ current-triggers
66 &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table ReplTrigger.TableToRepl ~
68 &Scoped-define FIELD-PAIRS-IN-QUERY-br_table~
69 ~
{&FP1}TableToRepl ~{&FP2}TableToRepl ~{&FP3}~
70 ~
{&FP1}Activity ~{&FP2}Activity ~{&FP3}
71 &Scoped-define ENABLED-TABLES-IN-QUERY-br_table ReplTrigger
72 &Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-br_table ReplTrigger
73 &Scoped-define OPEN-QUERY-br_table OPEN QUERY br_table FOR EACH ReplTrigger WHERE ~{&KEY-PHRASE} NO-LOCK ~
75 &Scoped-define TABLES-IN-QUERY-br_table ReplTrigger
76 &Scoped-define FIRST-TABLE-IN-QUERY-br_table ReplTrigger
79 /* Definitions for
FRAME F-Main
*/
81 /* Standard List Definitions
*/
82 &Scoped-Define ENABLED-OBJECTS br_table RECT-1 cmb_table tgl_create ~
84 &Scoped-Define DISPLAYED-OBJECTS cmb_table tgl_create tgl_modify tgl_delete
86 /* Custom List Definitions
*/
87 /* List-1
,List-2
,List-3
,List-4
,List-5
,List-6
*/
89 /* _UIB-PREPROCESSOR-BLOCK-END
*/
93 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" B-table-Win _INLINE
94 /* Actions
: ? adm
/support
/keyedit.w ? ? ?
*/
102 **************************
103 * Set attributes related to FOREIGN
KEYS
105 RUN set-attribute-list
(
107 Keys-Supplied
= ""'
:U
).
108 /**************************
111 /* _UIB-CODE-BLOCK-END
*/
114 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" B-table-Win _INLINE
115 /* Actions
: ? adm
/support
/advqedit.w ? ? ?
*/
123 ************************
124 * Set attributes related to SORTBY-OPTIONS
*/
125 RUN set-attribute-list
(
126 'SortBy-Options
= ""'
:U
).
127 /************************
130 </FILTER-ATTRIBUTES
> */
132 /* _UIB-CODE-BLOCK-END
*/
136 /* *********************** Control Definitions
********************** */
139 /* Definitions of the field level widgets
*/
140 DEFINE VARIABLE cmb_table
AS CHARACTER FORMAT "X(256)":U
141 VIEW-AS COMBO-BOX INNER-LINES 15
143 SIZE 17.14 BY 1 NO-UNDO.
145 DEFINE RECTANGLE RECT-1
146 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
149 DEFINE VARIABLE tgl_create
AS LOGICAL INITIAL no
154 DEFINE VARIABLE tgl_delete
AS LOGICAL INITIAL no
159 DEFINE VARIABLE tgl_modify
AS LOGICAL INITIAL no
164 /* Query definitions
*/
166 DEFINE QUERY br_table
FOR
167 ReplTrigger
SCROLLING.
170 /* Browse definitions
*/
171 DEFINE BROWSE br_table
172 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table B-table-Win _STRUCTURED
173 QUERY br_table
NO-LOCK DISPLAY
174 ReplTrigger.TableToRepl
175 ReplTrigger.Activity
COLUMN-LABEL "Rules"
176 current-triggers @ current-triggers
178 ReplTrigger.TableToRepl
180 /* _UIB-CODE-BLOCK-END
*/
182 WITH NO-ASSIGN NO-ROW-MARKERS SEPARATORS SIZE 38.29 BY 15.6
186 /* ************************ Frame Definitions
*********************** */
189 br_table
AT ROW 1 COL 1
190 cmb_table
AT ROW 2.2 COL 38.43 COLON-ALIGNED NO-LABEL
191 tgl_create
AT ROW 4.6 COL 43.29
192 tgl_modify
AT ROW 5.6 COL 43.29
193 tgl_delete
AT ROW 6.6 COL 43.29
194 "Table:" VIEW-AS TEXT
195 SIZE 8 BY 1 AT ROW 1.2 COL 40.43
196 "Replicate Changes on:" VIEW-AS TEXT
197 SIZE 15.43 BY 1 AT ROW 3.6 COL 41
198 RECT-1
AT ROW 4 COL 40.43
199 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
200 SIDE-LABELS NO-UNDERLINE THREE-D
201 AT COL 1 ROW 1 SCROLLABLE
205 /* *********************** Procedure Settings
************************ */
207 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
208 /* Settings for
THIS-PROCEDURE
212 Add Fields to
: EXTERNAL-TABLES
213 Other Settings
: PERSISTENT-ONLY
COMPILE
216 /* This procedure should always be
RUN PERSISTENT. Report the error
, */
217 /* then cleanup and return.
*/
218 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
219 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
220 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
224 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
226 /* ************************* Create Window
************************** */
228 &ANALYZE-SUSPEND _CREATE-WINDOW
229 /* DESIGN Window definition
(used by the UIB
)
230 CREATE WINDOW B-table-Win
ASSIGN
233 /* END WINDOW DEFINITION
*/
238 /* *************** Runtime Attributes and UIB Settings
************** */
240 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
241 /* SETTINGS
FOR WINDOW B-table-Win
242 NOT-VISIBLE
,,RUN-PERSISTENT
*/
243 /* SETTINGS
FOR FRAME F-Main
244 NOT-VISIBLE Size-to-Fit
*/
245 /* BROWSE-TAB br_table
1 F-Main
*/
247 FRAME F-Main
:SCROLLABLE = FALSE
248 FRAME F-Main
:HIDDEN = TRUE.
250 /* _RUN-TIME-ATTRIBUTES-END
*/
254 /* Setting information for Queries and Browse Widgets fields
*/
256 &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
257 /* Query rebuild information for
BROWSE br_table
258 _TblList
= "ttpl.ReplTrigger"
259 _Options
= "NO-LOCK KEY-PHRASE SORTBY-PHRASE"
260 _FldNameList
[1] > ttpl.ReplTrigger.TableToRepl
261 "ReplTrigger.TableToRepl" ? ?
"character" ? ? ? ? ? ? yes ?
262 _FldNameList
[2] > ttpl.ReplTrigger.Activity
263 "ReplTrigger.Activity" "Rules" ?
"character" ? ? ? ? ? ? yes ?
264 _FldNameList
[3] > "_<CALC>"
265 "current-triggers @ current-triggers" ? ? ? ? ? ? ? ? ? no ?
267 */ /* BROWSE br_table
*/
270 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
271 /* Query rebuild information for
FRAME F-Main
274 */ /* FRAME F-Main
*/
280 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win
281 /* ************************* Included-Libraries
*********************** */
283 {src
/adm
/method
/browser.i
}
284 {inc
/method
/m-drlvwr.i
}
286 /* _UIB-CODE-BLOCK-END
*/
292 /* ************************ Control Triggers
************************ */
294 &Scoped-define BROWSE-NAME br_table
295 &Scoped-define SELF-NAME br_table
296 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
297 ON ROW-DISPLAY
OF br_table
IN FRAME F-Main
299 current-triggers
:FGCOLOR IN BROWSE {&BROWSE-NAME} = 2.
302 /* _UIB-CODE-BLOCK-END
*/
306 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
307 ON ROW-ENTRY
OF br_table
IN FRAME F-Main
309 /* This code displays initial values for newly added or copied rows.
*/
310 {src
/adm
/template
/brsentry.i
}
313 /* _UIB-CODE-BLOCK-END
*/
317 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
318 ON ROW-LEAVE
OF br_table
IN FRAME F-Main
320 /* Do not disable this code or no updates will take place except
321 by pressing the Save button on an Update SmartPanel.
*/
322 {src
/adm
/template
/brsleave.i
}
325 /* _UIB-CODE-BLOCK-END
*/
329 &Scoped-define SELF-NAME ReplTrigger.TableToRepl
330 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ReplTrigger.TableToRepl br_table _BROWSE-COLUMN B-table-Win
331 ON LEAVE OF ReplTrigger.TableToRepl
IN BROWSE br_table
/* Table
*/
333 IF NOT AVAILABLE ReplTrigger
THEN RETURN.
335 DEF VAR widg-ent
AS WIDGET-HANDLE NO-UNDO.
336 widg-ent
= LAST-EVENT:WIDGET-ENTER.
337 /* Check to see if delete was pressed
- Crude
*/
338 IF VALID-HANDLE( widg-ent
) AND
339 INDEX( REPLACE( widg-ent
:LABEL, "&", "" ), "delete" ) <> 0 THEN RETURN.
341 IF NOT CAN-FIND( FIRST _File
WHERE _File._File-Name
= SELF:SCREEN-VALUE ) THEN DO:
342 MESSAGE "The table" SELF:SCREEN-VALUE "does not exist!"
343 VIEW-AS ALERT-BOX ERROR TITLE "Invalid Table Name".
348 /* _UIB-CODE-BLOCK-END
*/
352 &Scoped-define SELF-NAME cmb_table
353 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_table B-table-Win
354 ON VALUE-CHANGED
OF cmb_table
IN FRAME F-Main
359 /* _UIB-CODE-BLOCK-END
*/
363 &Scoped-define SELF-NAME tgl_create
364 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_create B-table-Win
365 ON VALUE-CHANGED
OF tgl_create
IN FRAME F-Main
/* Create
*/
370 /* _UIB-CODE-BLOCK-END
*/
374 &Scoped-define SELF-NAME tgl_delete
375 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_delete B-table-Win
376 ON VALUE-CHANGED
OF tgl_delete
IN FRAME F-Main
/* Delete
*/
381 /* _UIB-CODE-BLOCK-END
*/
385 &Scoped-define SELF-NAME tgl_modify
386 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL tgl_modify B-table-Win
387 ON VALUE-CHANGED
OF tgl_modify
IN FRAME F-Main
/* Modify
*/
392 /* _UIB-CODE-BLOCK-END
*/
398 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
401 /* *************************** Main Block
*************************** */
403 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
404 RUN dispatch
IN THIS-PROCEDURE ('initialize'
:U
).
407 ON FIND OF ReplTrigger
OVERRIDE DO:
408 FIND _File
WHERE _File._File-Name
= ReplTrigger.TableToRepl
411 IF AVAILABLE _File
THEN DO:
413 ( IF CAN-FIND( _File-Trig
WHERE _File-Trig._File-Recid
= RECID( _File
)
414 AND _File-Trig._Event
= "REPLICATION-CREATE" )
416 ( IF CAN-FIND( _File-Trig
WHERE _File-Trig._File-Recid
= RECID( _File
)
417 AND _File-Trig._Event
= "REPLICATION-WRITE" )
419 ( IF CAN-FIND( _File-Trig
WHERE _File-Trig._File-Recid
= RECID( _File
)
420 AND _File-Trig._Event
= "REPLICATION-DELETE" )
423 IF current-triggers
= "" THEN current-triggers
= "---".
426 ReplTrigger.Activity
:READ-ONLY IN BROWSE {&BROWSE-NAME} = Yes.
427 ReplTrigger.TableToRepl
:READ-ONLY IN BROWSE {&BROWSE-NAME} = Yes.
429 /* _UIB-CODE-BLOCK-END
*/
433 /* ********************** Internal Procedures
*********************** */
435 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE
436 PROCEDURE adm-row-available
:
437 /*------------------------------------------------------------------------------
438 Purpose
: Dispatched to this procedure when the Record-
439 Source has a new row available. This procedure
440 tries to get the new row
(or foriegn keys
) from
441 the Record-Source and process it.
443 ------------------------------------------------------------------------------*/
445 /* Define variables needed by this internal procedure.
*/
446 {src
/adm
/template
/row-head.i
}
448 /* Process the newly available records
(i.e. display fields
,
449 open queries
, and
/or pass records on to any RECORD-TARGETS
).
*/
450 {src
/adm
/template
/row-end.i
}
454 /* _UIB-CODE-BLOCK-END
*/
458 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE clear-all-rules B-table-Win
459 PROCEDURE clear-all-rules
:
460 /*------------------------------------------------------------------------------
462 ------------------------------------------------------------------------------*/
464 FOR EACH ReplTrigger
EXCLUSIVE-LOCK:
465 ReplTrigger.Activity
= "".
468 RUN dispatch
( 'open-query'
:U
).
472 /* _UIB-CODE-BLOCK-END
*/
476 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE
477 PROCEDURE disable_UI
:
478 /*------------------------------------------------------------------------------
479 Purpose
: DISABLE the User Interface
481 Notes
: Here we clean-up the user-interface by deleting
482 dynamic widgets we have created and
/or hide
483 frames. This procedure is usually called when
484 we are ready to
"clean-up" after running.
485 ------------------------------------------------------------------------------*/
486 /* Hide all frames.
*/
488 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
491 /* _UIB-CODE-BLOCK-END
*/
495 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE force-all-rules B-table-Win
496 PROCEDURE force-all-rules
:
497 /*------------------------------------------------------------------------------
499 ------------------------------------------------------------------------------*/
501 FOR EACH ReplTrigger
EXCLUSIVE-LOCK:
502 ReplTrigger.Activity
= "CMD".
505 RUN dispatch
( 'open-query'
:U
).
509 /* _UIB-CODE-BLOCK-END
*/
513 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-value-changed B-table-Win
514 PROCEDURE inst-value-changed
:
515 /*------------------------------------------------------------------------------
519 ------------------------------------------------------------------------------*/
522 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, "delete-record", "SENSITIVE = " +
523 IF AVAILABLE ReplTrigger
THEN "Yes" ELSE "No" ).
528 /* _UIB-CODE-BLOCK-END
*/
532 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-add-record B-table-Win
533 PROCEDURE local-add-record
:
534 /*------------------------------------------------------------------------------
538 ------------------------------------------------------------------------------*/
540 RUN dispatch
( 'add-record'
:U
).
545 /* _UIB-CODE-BLOCK-END
*/
549 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-destroy B-table-Win
550 PROCEDURE local-destroy
:
551 /*------------------------------------------------------------------------------
552 Purpose
: Override standard ADM method
554 ------------------------------------------------------------------------------*/
556 /* Code placed here will execute PRIOR to standard behavior.
*/
557 IF AVAILABLE ReplTrigger
THEN RUN dispatch
( 'update-record'
:U
).
559 /* Dispatch standard ADM method.
*/
560 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'destroy'
:U
) .
562 /* Code placed here will execute AFTER standard behavior.
*/
566 /* _UIB-CODE-BLOCK-END
*/
570 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE match-database B-table-Win
571 PROCEDURE match-database
:
572 /*------------------------------------------------------------------------------
573 Purpose
: Regenerate the dump rules according to the database triggers
574 ------------------------------------------------------------------------------*/
576 IF AVAILABLE ReplTrigger
THEN RUN dispatch
( 'update-record'
:U
).
579 "Are you sure you want to regenerate this table" SKIP
580 "from the existing database triggers?"
581 VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO TITLE "Proceed ?"
582 UPDATE regenerate-it
AS LOGI.
584 IF NOT regenerate-it
THEN RETURN.
586 RUN rplctn
/db2rptrg.p .
588 RUN dispatch
( 'open-query'
:U
).
592 /* _UIB-CODE-BLOCK-END
*/
596 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE options-changed B-table-Win
597 PROCEDURE options-changed
:
598 /*------------------------------------------------------------------------------
602 ------------------------------------------------------------------------------*/
604 DO WITH FRAME {&FRAME-NAME}:
605 IF NOT AVAILABLE ReplTrigger
THEN RETURN.
606 DEF VAR act
AS CHAR NO-UNDO.
607 ASSIGN FRAME {&FRAME-NAME} tgl_create tgl_modify tgl_delete.
608 act
= ( IF tgl_create
THEN "C" ELSE "" ) +
609 ( IF tgl_modify
THEN "M" ELSE "" ) +
610 ( IF tgl_delete
THEN "D" ELSE "" ).
611 ReplTrigger.Activity
:SCREEN-VALUE IN BROWSE {&BROWSE-NAME} = act.
612 /* Ensure that the record gets updated
*/
613 RUN dispatch
( 'update-record'
:U
).
618 /* _UIB-CODE-BLOCK-END
*/
622 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-initialize B-table-Win
623 PROCEDURE pre-initialize
:
624 /*------------------------------------------------------------------------------
626 ------------------------------------------------------------------------------*/
628 /* Populate the table name combo
*/
630 FOR EACH _File
WHERE NOT _File._File-Name
BEGINS "_" NO-LOCK:
631 IF cmb_table
:ADD-LAST( _File._File-Name
) IN FRAME {&FRAME-NAME} THEN.
636 /* _UIB-CODE-BLOCK-END
*/
640 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE regenerate-df B-table-Win
641 PROCEDURE regenerate-df
:
642 /*------------------------------------------------------------------------------
643 Purpose
: Regenerate a schema df file containing all
644 of the instructions necessary to add replication
645 triggers to all of the tables that have dump rules
648 ------------------------------------------------------------------------------*/
650 IF AVAILABLE ReplTrigger
THEN RUN dispatch
( 'update-record'
:U
).
653 "You should only regenerate the replication schema" SKIP
654 "from a pre-production database." SKIP(1)
655 "Are you sure you want to continue?"
656 VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO TITLE "Proceed ?"
657 UPDATE regenerate-it
AS LOGI.
659 IF NOT regenerate-it
THEN RETURN.
661 RUN rplctn\mkreptrg.p
( df-name
).
663 "Schema regeneration complete!" SKIP(1)
664 "You need to load the schema df:" SKIP
666 "into all replication databases" SKIP
667 "and recompile all/appropriate" SKIP
669 VIEW-AS ALERT-BOX INFORMATION.
673 /* _UIB-CODE-BLOCK-END
*/
677 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE replicate-out B-table-Win
678 PROCEDURE replicate-out
:
679 /*------------------------------------------------------------------------------
681 ------------------------------------------------------------------------------*/
682 RUN notify
( 'set-busy
,container-source'
:U
).
683 RUN rplctn
/repldump.p .
684 RUN notify
( 'set-idle
,container-source'
:U
).
685 MESSAGE "Data for outward replication dumped to file".
688 /* _UIB-CODE-BLOCK-END
*/
692 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS
693 PROCEDURE send-records
:
694 /*------------------------------------------------------------------------------
695 Purpose
: Send record
ROWID's for all tables used by
697 Parameters
: see template
/snd-head.i
698 ------------------------------------------------------------------------------*/
700 /* Define variables needed by this internal procedure.
*/
701 {src
/adm
/template
/snd-head.i
}
703 /* For each requested table
, put it's
ROWID in the output list.
*/
704 {src
/adm
/template
/snd-list.i
"ReplTrigger"}
706 /* Deal with any unexpected table requests before closing.
*/
707 {src
/adm
/template
/snd-end.i
}
711 /* _UIB-CODE-BLOCK-END
*/
715 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win
716 PROCEDURE state-changed
:
717 /* -----------------------------------------------------------
721 -------------------------------------------------------------*/
722 DEFINE INPUT PARAMETER p-issuer-hdl
AS HANDLE NO-UNDO.
723 DEFINE INPUT PARAMETER p-state
AS CHARACTER NO-UNDO.
726 /* Object instance CASEs can go here to replace standard behavior
728 {src
/adm
/template
/bstates.i
}
732 /* _UIB-CODE-BLOCK-END
*/
736 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE table-changed B-table-Win
737 PROCEDURE table-changed
:
738 /*------------------------------------------------------------------------------
742 ------------------------------------------------------------------------------*/
744 DO WITH FRAME {&FRAME-NAME}:
745 ReplTrigger.TableToRepl
:SCREEN-VALUE IN BROWSE {&BROWSE-NAME} = INPUT cmb_table.
746 /* Ensure that the record gets updated
*/
747 RUN dispatch
( 'update-record'
:U
).
748 IF BROWSE {&BROWSE-NAME}:REFRESH() THEN.
753 /* _UIB-CODE-BLOCK-END
*/
757 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE trigger-changed B-table-Win
758 PROCEDURE trigger-changed
:
759 /*------------------------------------------------------------------------------
763 ------------------------------------------------------------------------------*/
765 DO WITH FRAME {&FRAME-NAME}:
766 DEF VAR act
AS CHAR NO-UNDO.
767 act
= INPUT BROWSE {&BROWSE-NAME} ReplTrigger.Activity.
768 tgl_create
= INDEX( act
, "C" ) <> 0.
769 tgl_modify
= INDEX( act
, "M" ) <> 0.
770 tgl_delete
= INDEX( act
, "D" ) <> 0.
771 cmb_table
:SCREEN-VALUE = INPUT BROWSE {&BROWSE-NAME} ReplTrigger.TableToRepl.
776 WITH FRAME {&FRAME-NAME}.
781 /* _UIB-CODE-BLOCK-END
*/