Resolved bug with non-detailed intercompany styles.
[capital-apms-progress.git] / lnk / b-prglnk.w
blob85e065352fecc3b610ab111f4f44c8fd3cef1368
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
2 &ANALYZE-RESUME
3 /* Connected Databases
4 */
5 &Scoped-define WINDOW-NAME CURRENT-WINDOW
6 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win
7 /*------------------------------------------------------------------------
8 File:
9 Description:
10 ------------------------------------------------------------------------*/
11 CREATE WIDGET-POOL.
12 /* *************************** Definitions ************************** */
14 DEF VAR filter-src AS INT NO-UNDO.
15 DEF VAR filter-trg AS INT NO-UNDO.
16 DEF VAR filter-by AS CHAR NO-UNDO.
18 DEF VAR src-type AS CHAR NO-UNDO.
19 DEF VAR filter-value AS CHAR NO-UNDO.
21 DEF VAR last-src AS INT NO-UNDO.
22 DEF VAR last-trg AS INT NO-UNDO.
23 DEF VAR last-by AS CHAR NO-UNDO.
24 DEF VAR last-value AS CHAR NO-UNDO.
26 DEF VAR re-open-the-query AS LOGI NO-UNDO INITIAL No.
28 /* _UIB-CODE-BLOCK-END */
29 &ANALYZE-RESUME
32 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
34 /* ******************** Preprocessor Definitions ******************** */
36 &Scoped-define PROCEDURE-TYPE SmartBrowser
38 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
40 /* Name of first Frame and/or Browse and/or first Query */
41 &Scoped-define FRAME-NAME F-Main
42 &Scoped-define BROWSE-NAME br_table
44 /* Internal Tables (found by Frame, Query & Browse Queries) */
45 &Scoped-define INTERNAL-TABLES ProgramLink
47 /* Definitions for BROWSE br_table */
48 &Scoped-define FIELDS-IN-QUERY-br_table ProgramLink.LinkType ProgramLink.ButtonLabel ProgramLink.Description
49 &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table ProgramLink.LinkType
50 &Scoped-define FIELD-PAIRS-IN-QUERY-br_table~
51 ~{&FP1}LinkType ~{&FP2}LinkType ~{&FP3}
52 &Scoped-define ENABLED-TABLES-IN-QUERY-br_table ProgramLink
53 &Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-br_table ProgramLink
54 &Scoped-define SELF-NAME br_table
55 &Scoped-define OPEN-QUERY-br_table CASE filter-by: WHEN 'from Src' THEN OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK WHERE ProgramLink.Source = filter-src AND ProgramLink.ButtonLabel BEGINS filter-value BY ProgramLink.ButtonLabel . WHEN 'to Tgt' THEN OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK WHERE ProgramLink.Target = filter-trg BY ProgramLink.ButtonLabel . WHEN 'Both' THEN OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK WHERE ProgramLink.Source = filter-src AND ProgramLink.Target = filter-trg BY ProgramLink.ButtonLabel . END CASE.
56 &Scoped-define TABLES-IN-QUERY-br_table ProgramLink
57 &Scoped-define FIRST-TABLE-IN-QUERY-br_table ProgramLink
60 /* Definitions for FRAME F-Main */
62 /* Standard List Definitions */
63 &Scoped-Define ENABLED-OBJECTS br_table
65 /* Custom List Definitions */
66 /* List-1,List-2,List-3,List-4,List-5,List-6 */
68 /* _UIB-PREPROCESSOR-BLOCK-END */
69 &ANALYZE-RESUME
73 /* *********************** Control Definitions ********************** */
76 /* Menu Definitions */
77 DEFINE MENU POPUP-MENU-br_table
78 MENU-ITEM m_Delete_Link LABEL "&Delete Link"
79 MENU-ITEM m_Reset_target LABEL "Reset &Target"
80 MENU-ITEM m_Reset_Source LABEL "Reset &Source"
81 MENU-ITEM m_Make_Copy LABEL "&Make_Copy" .
84 /* Definitions of the field level widgets */
85 /* Query definitions */
86 &ANALYZE-SUSPEND
87 DEFINE QUERY br_table FOR
88 ProgramLink SCROLLING.
89 &ANALYZE-RESUME
91 /* Browse definitions */
92 DEFINE BROWSE br_table
93 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table B-table-Win _FREEFORM
94 QUERY br_table NO-LOCK DISPLAY
95 ProgramLink.LinkType COLUMN-LABEL "Type" FORMAT "X(5)"
96 ProgramLink.ButtonLabel COLUMN-LABEL "Label" FORMAT "X(21)"
97 ProgramLink.Description FORMAT "X(39)"
98 ENABLE
99 ProgramLink.LinkType
100 /* _UIB-CODE-BLOCK-END */
101 &ANALYZE-RESUME
102 WITH NO-LABELS NO-ASSIGN NO-ROW-MARKERS NO-COLUMN-SCROLLING SIZE 51.43 BY 12
103 BGCOLOR 16 FONT 10.
106 /* ************************ Frame Definitions *********************** */
108 DEFINE FRAME F-Main
109 br_table AT ROW 1 COL 1
110 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
111 SIDE-LABELS NO-UNDERLINE THREE-D
112 AT COL 1 ROW 1 SCROLLABLE
113 BGCOLOR 8 FGCOLOR 0 .
116 /* *********************** Procedure Settings ************************ */
118 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
119 /* Settings for THIS-PROCEDURE
120 Type: SmartBrowser
121 Allow: Basic,Browse
122 Frames: 1
123 Add Fields to: EXTERNAL-TABLES
124 Other Settings: PERSISTENT-ONLY COMPILE
127 /* This procedure should always be RUN PERSISTENT. Report the error, */
128 /* then cleanup and return. */
129 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
130 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
131 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
132 RETURN.
133 END.
135 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
137 /* ************************* Create Window ************************** */
139 &ANALYZE-SUSPEND _CREATE-WINDOW
140 /* DESIGN Window definition (used by the UIB)
141 CREATE WINDOW B-table-Win ASSIGN
142 HEIGHT = 14.55
143 WIDTH = 64.57.
144 /* END WINDOW DEFINITION */
146 &ANALYZE-RESUME
149 /* *************** Runtime Attributes and UIB Settings ************** */
151 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
152 /* SETTINGS FOR WINDOW B-table-Win
153 NOT-VISIBLE,,RUN-PERSISTENT */
154 /* SETTINGS FOR FRAME F-Main
155 NOT-VISIBLE Size-to-Fit */
156 /* BROWSE-TAB br_table 1 F-Main */
157 ASSIGN
158 FRAME F-Main:SCROLLABLE = FALSE
159 FRAME F-Main:HIDDEN = TRUE.
161 ASSIGN
162 br_table:POPUP-MENU IN FRAME F-Main = MENU POPUP-MENU-br_table:HANDLE
163 br_table:MAX-DATA-GUESS IN FRAME F-Main = 200.
165 /* _RUN-TIME-ATTRIBUTES-END */
166 &ANALYZE-RESUME
169 /* Setting information for Queries and Browse Widgets fields */
171 &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
172 /* Query rebuild information for BROWSE br_table
173 _START_FREEFORM
174 CASE filter-by:
175 WHEN 'from Src' THEN
176 OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK
177 WHERE ProgramLink.Source = filter-src
178 AND ProgramLink.ButtonLabel BEGINS filter-value
179 BY ProgramLink.ButtonLabel .
180 WHEN 'to Tgt' THEN
181 OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK
182 WHERE ProgramLink.Target = filter-trg
183 BY ProgramLink.ButtonLabel .
184 WHEN 'Both' THEN
185 OPEN QUERY br_table FOR EACH ProgramLink NO-LOCK
186 WHERE ProgramLink.Source = filter-src AND ProgramLink.Target = filter-trg
187 BY ProgramLink.ButtonLabel .
188 END CASE.
189 _END_FREEFORM
190 _Options = "NO-LOCK"
191 _Query is NOT OPENED
192 */ /* BROWSE br_table */
193 &ANALYZE-RESUME
195 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
196 /* Query rebuild information for FRAME F-Main
197 _Options = "NO-LOCK"
198 _Query is NOT OPENED
199 */ /* FRAME F-Main */
200 &ANALYZE-RESUME
205 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win
206 /* ************************* Included-Libraries *********************** */
208 {src/adm/method/browser.i}
210 /* _UIB-CODE-BLOCK-END */
211 &ANALYZE-RESUME
216 /* ************************ Control Triggers ************************ */
218 &Scoped-define BROWSE-NAME br_table
219 &Scoped-define SELF-NAME br_table
220 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
221 ON ROW-DISPLAY OF br_table IN FRAME F-Main
223 DEF VAR fgcolor AS INT NO-UNDO.
224 ASSIGN
225 fgcolor = (IF ProgramLink.Target = filter-trg THEN 12 ELSE ?)
226 ProgramLink.LinkType:FGCOLOR IN BROWSE {&BROWSE-NAME} = fgcolor
227 ProgramLink.Description:FGCOLOR = fgcolor.
228 END.
230 /* _UIB-CODE-BLOCK-END */
231 &ANALYZE-RESUME
234 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
235 ON ROW-ENTRY OF br_table IN FRAME F-Main
237 /* This code displays initial values for newly added or copied rows. */
238 {src/adm/template/brsentry.i}
239 END.
241 /* _UIB-CODE-BLOCK-END */
242 &ANALYZE-RESUME
245 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
246 ON ROW-LEAVE OF br_table IN FRAME F-Main
248 /* Do not disable this code or no updates will take place except
249 by pressing the Save button on an Update SmartPanel. */
250 {src/adm/template/brsleave.i}
251 END.
253 /* _UIB-CODE-BLOCK-END */
254 &ANALYZE-RESUME
257 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
258 ON VALUE-CHANGED OF br_table IN FRAME F-Main
260 /* This ADM trigger code must be preserved in order to notify other
261 objects when the browser's current row changes. */
262 {src/adm/template/brschnge.i}
263 END.
265 /* _UIB-CODE-BLOCK-END */
266 &ANALYZE-RESUME
269 &Scoped-define SELF-NAME m_Delete_Link
270 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Delete_Link B-table-Win
271 ON CHOOSE OF MENU-ITEM m_Delete_Link /* Delete Link */
273 DEF VAR delete-it AS LOGI NO-UNDO INITIAL No.
274 MESSAGE "Are you sure you want to delete this link ?"
275 VIEW-AS ALERT-BOX QUESTION BUTTONS YES-NO UPDATE delete-it.
277 IF delete-it THEN RUN dispatch( 'delete-record':U ).
278 END.
280 /* _UIB-CODE-BLOCK-END */
281 &ANALYZE-RESUME
284 &Scoped-define SELF-NAME m_Make_Copy
285 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Make_Copy B-table-Win
286 ON CHOOSE OF MENU-ITEM m_Make_Copy /* Make_Copy */
288 RUN copy-link.
289 END.
291 /* _UIB-CODE-BLOCK-END */
292 &ANALYZE-RESUME
295 &Scoped-define SELF-NAME m_Reset_Source
296 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Reset_Source B-table-Win
297 ON CHOOSE OF MENU-ITEM m_Reset_Source /* Reset Source */
299 RUN reset-source.
300 END.
302 /* _UIB-CODE-BLOCK-END */
303 &ANALYZE-RESUME
306 &Scoped-define SELF-NAME m_Reset_target
307 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL m_Reset_target B-table-Win
308 ON CHOOSE OF MENU-ITEM m_Reset_target /* Reset Target */
310 RUN reset-target.
311 END.
313 /* _UIB-CODE-BLOCK-END */
314 &ANALYZE-RESUME
317 &UNDEFINE SELF-NAME
319 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
322 /* *************************** Main Block *************************** */
324 RUN set-attribute-list( 'FilterBy-Case = from Src,
325 FilterBy-Options = from Src|to Tgt|Both|Unlinked':U ).
327 /* _UIB-CODE-BLOCK-END */
328 &ANALYZE-RESUME
331 /* ********************** Internal Procedures *********************** */
333 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE add-link B-table-Win
334 PROCEDURE add-link :
335 /*------------------------------------------------------------------------------
336 Purpose:
337 Parameters: <none>
338 Notes:
339 ------------------------------------------------------------------------------*/
340 DEF VAR src AS INT NO-UNDO.
341 DEF VAR trg AS INT NO-UNDO.
343 RUN get-attribute( 'LinkSource':U ). src = INT( RETURN-VALUE ).
344 RUN get-attribute( 'LinkTarget':U ). trg = INT( RETURN-VALUE ).
346 IF CAN-FIND( FIRST LinkNode WHERE LinkNode.NodeCode = src ) AND
347 CAN-FIND( FIRST LinkNode WHERE LinkNode.NodeCode = trg ) THEN
348 DO WITH FRAME {&FRAME-NAME}:
349 RUN dispatch( 'add-record':U ).
350 ProgramLink.Description:SCREEN-VALUE IN BROWSE {&BROWSE-NAME} = "".
351 RUN dispatch( 'update-record':U ).
352 RUN notify( 'row-available':U ).
353 END.
355 END PROCEDURE.
357 /* _UIB-CODE-BLOCK-END */
358 &ANALYZE-RESUME
361 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE
362 PROCEDURE adm-row-available :
363 /*------------------------------------------------------------------------------
364 Purpose: Dispatched to this procedure when the Record-
365 Source has a new row available. This procedure
366 tries to get the new row (or foriegn keys) from
367 the Record-Source and process it.
368 Parameters: <none>
369 ------------------------------------------------------------------------------*/
371 /* Define variables needed by this internal procedure. */
372 {src/adm/template/row-head.i}
374 /* Process the newly available records (i.e. display fields,
375 open queries, and/or pass records on to any RECORD-TARGETS). */
376 {src/adm/template/row-end.i}
378 END PROCEDURE.
380 /* _UIB-CODE-BLOCK-END */
381 &ANALYZE-RESUME
384 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE copy-link B-table-Win
385 PROCEDURE copy-link :
386 /*------------------------------------------------------------------------------
387 Purpose:
388 ------------------------------------------------------------------------------*/
390 IF NOT AVAILABLE ProgramLink THEN RETURN.
392 DEF BUFFER CopyLink FOR ProgramLink.
394 CREATE copyLink.
395 BUFFER-COPY ProgramLink EXCEPT LinkCode TO CopyLink
396 ASSIGN CopyLink.Description = "Copy of " + ProgramLink.Description.
398 re-open-the-query = Yes.
399 RUN dispatch( 'open-query':U ).
400 REPOSITION {&BROWSE-NAME} TO ROWID ROWID( CopyLink ).
402 END PROCEDURE.
404 /* _UIB-CODE-BLOCK-END */
405 &ANALYZE-RESUME
408 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE
409 PROCEDURE disable_UI :
410 /*------------------------------------------------------------------------------
411 Purpose: DISABLE the User Interface
412 Parameters: <none>
413 Notes: Here we clean-up the user-interface by deleting
414 dynamic widgets we have created and/or hide
415 frames. This procedure is usually called when
416 we are ready to "clean-up" after running.
417 ------------------------------------------------------------------------------*/
418 /* Hide all frames. */
419 HIDE FRAME F-Main.
420 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
421 END PROCEDURE.
423 /* _UIB-CODE-BLOCK-END */
424 &ANALYZE-RESUME
427 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-apply-entry B-table-Win
428 PROCEDURE local-apply-entry :
429 /*------------------------------------------------------------------------------
430 Purpose: Override standard ADM method
431 Notes:
432 ------------------------------------------------------------------------------*/
434 /* Code placed here will execute PRIOR to standard behavior. */
435 IF NOT( src-type BEGINS "MN" ) THEN RETURN.
437 /* Dispatch standard ADM method. */
438 RUN dispatch IN THIS-PROCEDURE ( INPUT 'apply-entry':U ) .
440 /* Code placed here will execute AFTER standard behavior. */
442 END PROCEDURE.
444 /* _UIB-CODE-BLOCK-END */
445 &ANALYZE-RESUME
448 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-assign-statement B-table-Win
449 PROCEDURE local-assign-statement :
450 /*------------------------------------------------------------------------------
451 Purpose: Override standard ADM method
452 Notes:
453 ------------------------------------------------------------------------------*/
455 /* Code placed here will execute PRIOR to standard behavior. */
457 DEF VAR src AS INT NO-UNDO.
458 DEF VAR trg AS INT NO-UNDO.
459 DEF VAR link-type AS CHAR INITIAL "DRL" NO-UNDO.
460 DEF BUFFER ln-t FOR LinkNode.
462 RUN get-attribute ( 'LinkSource':U ). src = INT( RETURN-VALUE ).
463 RUN get-attribute ( 'LinkTarget':U ). trg = INT( RETURN-VALUE ).
465 FIND ln-t WHERE ln-t.NodeCode = trg NO-LOCK NO-ERROR.
467 IF src = trg THEN
468 link-type = "MSG".
469 ELSE IF AVAILABLE(ln-t) AND ln-t.NodeType = "SW" THEN
470 link-type = "SEL".
471 ELSE IF AVAILABLE(ln-t) AND ln-t.NodeType = "MW" THEN
472 link-type = "MNT".
473 ELSE IF AVAILABLE(ln-t) AND ln-t.NodeType = "MN" THEN
474 link-type = "MNU".
475 ELSE
476 link-type = "DRL".
478 ASSIGN
479 ProgramLink.Source = src
480 ProgramLink.Target = trg
481 ProgramLink.LinkType = link-type
484 /* Dispatch standard ADM method. */
485 RUN dispatch IN THIS-PROCEDURE ( INPUT 'assign-statement':U ) .
487 /* Code placed here will execute AFTER standard behavior. */
488 IF link-type = "MNU" THEN ASSIGN
489 ProgramLink.CreateViewer = No
490 ProgramLink.Viewer = "Default" .
492 END PROCEDURE.
494 /* _UIB-CODE-BLOCK-END */
495 &ANALYZE-RESUME
498 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-initialize B-table-Win
499 PROCEDURE local-initialize :
500 /*------------------------------------------------------------------------------
501 Purpose: Override standard ADM method
502 Notes:
503 ------------------------------------------------------------------------------*/
505 /* Code placed here will execute PRIOR to standard behavior. */
507 /* Dispatch standard ADM method. */
508 RUN dispatch IN THIS-PROCEDURE ( INPUT 'initialize':U ) .
510 /* Code placed here will execute AFTER standard behavior. */
511 ProgramLink.LinkType:READ-ONLY IN BROWSE {&BROWSE-NAME} = Yes.
513 END PROCEDURE.
515 /* _UIB-CODE-BLOCK-END */
516 &ANALYZE-RESUME
519 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-open-query B-table-Win
520 PROCEDURE local-open-query :
521 /*------------------------------------------------------------------------------
522 Purpose: Override standard ADM method
523 ------------------------------------------------------------------------------*/
525 /* Code placed here will execute PRIOR to standard behavior. */
526 IF re-open-the-query THEN
527 . /* bypass the "don't" logic below! */
528 ELSE IF filter-by = "Unlinked" THEN RETURN.
529 ELSE IF filter-by = last-by THEN DO:
530 IF filter-by = "from Src" THEN DO:
531 IF last-src = filter-src AND last-by = filter-by AND last-value = filter-value THEN RETURN.
532 END.
533 ELSE IF filter-by = "to Tgt" THEN DO:
534 IF last-trg = filter-trg THEN RETURN.
535 END.
536 ELSE IF last-src = filter-src AND last-by = filter-by
537 AND last-trg = filter-trg AND last-value = filter-value THEN RETURN.
538 END.
539 last-src = filter-src. last-trg = filter-trg.
540 last-by = filter-by. last-value = filter-value.
541 re-open-the-query = No.
543 /* Dispatch standard ADM method. */
544 RUN dispatch IN THIS-PROCEDURE ( INPUT 'open-query':U ) .
546 /* Code placed here will execute AFTER standard behavior. */
547 {&BROWSE-NAME}:MAX-DATA-GUESS IN FRAME {&FRAME-NAME} = 200.
548 END PROCEDURE.
550 /* _UIB-CODE-BLOCK-END */
551 &ANALYZE-RESUME
554 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-source B-table-Win
555 PROCEDURE reset-source :
556 /*------------------------------------------------------------------------------
557 Purpose: Reset the current linknode to point to the current source node.
558 ------------------------------------------------------------------------------*/
559 DO TRANSACTION:
560 FIND CURRENT ProgramLink EXCLUSIVE-LOCK.
561 ProgramLink.Source = filter-src.
562 FIND CURRENT ProgramLink NO-LOCK.
563 END.
564 END PROCEDURE.
566 /* _UIB-CODE-BLOCK-END */
567 &ANALYZE-RESUME
570 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE reset-target B-table-Win
571 PROCEDURE reset-target :
572 /*------------------------------------------------------------------------------
573 Purpose: Reset the current linknode to point to the current target.
574 ------------------------------------------------------------------------------*/
575 DO TRANSACTION:
576 FIND CURRENT ProgramLink EXCLUSIVE-LOCK.
577 ProgramLink.Target = filter-trg.
578 FIND CURRENT ProgramLink NO-LOCK.
579 END.
580 END PROCEDURE.
582 /* _UIB-CODE-BLOCK-END */
583 &ANALYZE-RESUME
586 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS
587 PROCEDURE send-records :
588 /*------------------------------------------------------------------------------
589 Purpose: Send record ROWID's for all tables used by
590 this file.
591 Parameters: see template/snd-head.i
592 ------------------------------------------------------------------------------*/
594 /* Define variables needed by this internal procedure. */
595 {src/adm/template/snd-head.i}
597 /* For each requested table, put it's ROWID in the output list. */
598 {src/adm/template/snd-list.i "ProgramLink"}
600 /* Deal with any unexpected table requests before closing. */
601 {src/adm/template/snd-end.i}
603 END PROCEDURE.
605 /* _UIB-CODE-BLOCK-END */
606 &ANALYZE-RESUME
609 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win
610 PROCEDURE state-changed :
611 /* -----------------------------------------------------------
612 Purpose:
613 Parameters: <none>
614 Notes:
615 -------------------------------------------------------------*/
616 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
617 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
619 CASE p-state:
620 /* Object instance CASEs can go here to replace standard behavior
621 or add new cases. */
622 {src/adm/template/bstates.i}
623 END CASE.
624 END PROCEDURE.
626 /* _UIB-CODE-BLOCK-END */
627 &ANALYZE-RESUME
630 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-Filter-Value B-table-Win
631 PROCEDURE use-Filter-Value :
632 /*------------------------------------------------------------------------------
633 Purpose:
634 ------------------------------------------------------------------------------*/
635 DEF INPUT PARAMETER new-value AS CHAR NO-UNDO.
637 IF src-type BEGINS "MN" THEN
638 filter-value = new-value.
639 ELSE
640 filter-value = "".
642 END PROCEDURE.
644 /* _UIB-CODE-BLOCK-END */
645 &ANALYZE-RESUME
648 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-FilterBy-Case B-table-Win
649 PROCEDURE use-FilterBy-Case :
650 /*------------------------------------------------------------------------------
651 Purpose:
652 ------------------------------------------------------------------------------*/
653 DEF INPUT PARAMETER new-by AS CHAR NO-UNDO.
654 filter-by = new-by.
655 END PROCEDURE.
657 /* _UIB-CODE-BLOCK-END */
658 &ANALYZE-RESUME
661 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-LinkSource B-table-Win
662 PROCEDURE use-LinkSource :
663 /*------------------------------------------------------------------------------
664 Purpose:
665 ------------------------------------------------------------------------------*/
666 DEF INPUT PARAMETER new-src AS CHAR NO-UNDO.
667 filter-src = INT(new-src).
669 DEF BUFFER MyNode FOR LinkNode.
670 FIND MyNode WHERE MyNode.NodeCode = filter-src NO-LOCK NO-ERROR.
671 src-type = MyNode.NodeType.
672 IF NOT(src-type BEGINS "MN") THEN
673 filter-value = "".
675 END PROCEDURE.
677 /* _UIB-CODE-BLOCK-END */
678 &ANALYZE-RESUME
681 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE use-LinkTarget B-table-Win
682 PROCEDURE use-LinkTarget :
683 /*------------------------------------------------------------------------------
684 Purpose:
685 ------------------------------------------------------------------------------*/
686 DEF INPUT PARAMETER new-trg AS CHAR NO-UNDO.
687 filter-trg = INT(new-trg).
688 END PROCEDURE.
690 /* _UIB-CODE-BLOCK-END */
691 &ANALYZE-RESUME