When processing by company, list in creditor/voucher sequence.
[capital-apms-progress.git] / workflow / b-activity-status.w
blobe904a2eed19645061e5b274bc240f0f22ee78262
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI
2 &ANALYZE-RESUME
3 /* Connected Databases
4 ttpl PROGRESS
5 */
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win
8 /*------------------------------------------------------------------------
10 File:
12 Description: from BROWSER.W - Basic SmartBrowser Object Template
14 Input Parameters:
15 <none>
17 Output Parameters:
18 <none>
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. */
30 CREATE WIDGET-POOL.
32 /* *************************** Definitions ************************** */
34 /* Parameters Definitions --- */
36 /* Local Variable Definitions --- */
38 /* _UIB-CODE-BLOCK-END */
39 &ANALYZE-RESUME
42 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
44 /* ******************** Preprocessor Definitions ******************** */
46 &Scoped-define PROCEDURE-TYPE SmartBrowser
48 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
50 /* Name of first Frame and/or Browse and/or first Query */
51 &Scoped-define FRAME-NAME F-Main
52 &Scoped-define BROWSE-NAME br_table
54 /* Internal Tables (found by Frame, Query & Browse Queries) */
55 &Scoped-define INTERNAL-TABLES ActivityStatus
57 /* Define KEY-PHRASE in case it is used by any query. */
58 &Scoped-define KEY-PHRASE TRUE
60 /* Definitions for BROWSE br_table */
61 &Scoped-define FIELDS-IN-QUERY-br_table ActivityStatus.ActivityStatus ~
62 ActivityStatus.Description
63 &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table ~
64 ActivityStatus.ActivityStatus ActivityStatus.Description
65 &Scoped-define FIELD-PAIRS-IN-QUERY-br_table~
66 ~{&FP1}ActivityStatus ~{&FP2}ActivityStatus ~{&FP3}~
67 ~{&FP1}Description ~{&FP2}Description ~{&FP3}
68 &Scoped-define ENABLED-TABLES-IN-QUERY-br_table ActivityStatus
69 &Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-br_table ActivityStatus
70 &Scoped-define OPEN-QUERY-br_table OPEN QUERY br_table FOR EACH ActivityStatus WHERE ~{&KEY-PHRASE} NO-LOCK ~
71 ~{&SORTBY-PHRASE}.
72 &Scoped-define TABLES-IN-QUERY-br_table ActivityStatus
73 &Scoped-define FIRST-TABLE-IN-QUERY-br_table ActivityStatus
76 /* Definitions for FRAME F-Main */
78 /* Standard List Definitions */
79 &Scoped-Define ENABLED-OBJECTS br_table
81 /* Custom List Definitions */
82 /* List-1,List-2,List-3,List-4,List-5,List-6 */
84 /* _UIB-PREPROCESSOR-BLOCK-END */
85 &ANALYZE-RESUME
88 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" B-table-Win _INLINE
89 /* Actions: ? adm/support/keyedit.w ? ? ? */
90 /* STRUCTURED-DATA
91 <KEY-OBJECT>
92 &BROWSE-NAME
93 </KEY-OBJECT>
94 <FOREIGN-KEYS>
95 </FOREIGN-KEYS>
96 <EXECUTING-CODE>
97 **************************
98 * Set attributes related to FOREIGN KEYS
100 RUN set-attribute-list (
101 'Keys-Accepted = "",
102 Keys-Supplied = ""':U).
103 /**************************
104 </EXECUTING-CODE> */
106 /* _UIB-CODE-BLOCK-END */
107 &ANALYZE-RESUME
109 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" B-table-Win _INLINE
110 /* Actions: ? adm/support/advqedit.w ? ? ? */
111 /* STRUCTURED-DATA
112 <KEY-OBJECT>
113 &BROWSE-NAME
114 </KEY-OBJECT>
115 <SORTBY-OPTIONS>
116 </SORTBY-OPTIONS>
117 <SORTBY-RUN-CODE>
118 ************************
119 * Set attributes related to SORTBY-OPTIONS */
120 RUN set-attribute-list (
121 'SortBy-Options = ""':U).
122 /************************
123 </SORTBY-RUN-CODE>
124 <FILTER-ATTRIBUTES>
125 </FILTER-ATTRIBUTES> */
127 /* _UIB-CODE-BLOCK-END */
128 &ANALYZE-RESUME
131 /* *********************** Control Definitions ********************** */
134 /* Definitions of the field level widgets */
135 /* Query definitions */
136 &ANALYZE-SUSPEND
137 DEFINE QUERY br_table FOR
138 ActivityStatus SCROLLING.
139 &ANALYZE-RESUME
141 /* Browse definitions */
142 DEFINE BROWSE br_table
143 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table B-table-Win _STRUCTURED
144 QUERY br_table NO-LOCK DISPLAY
145 ActivityStatus.ActivityStatus COLUMN-LABEL "Status"
146 ActivityStatus.Description
147 ENABLE
148 ActivityStatus.ActivityStatus
149 ActivityStatus.Description
150 /* _UIB-CODE-BLOCK-END */
151 &ANALYZE-RESUME
152 WITH NO-ASSIGN SEPARATORS SIZE 46.29 BY 12.8
153 BGCOLOR 16 .
156 /* ************************ Frame Definitions *********************** */
158 DEFINE FRAME F-Main
159 br_table AT ROW 1 COL 1
160 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
161 SIDE-LABELS NO-UNDERLINE THREE-D
162 AT COL 1 ROW 1 SCROLLABLE
163 BGCOLOR 8 FGCOLOR 0 .
166 /* *********************** Procedure Settings ************************ */
168 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
169 /* Settings for THIS-PROCEDURE
170 Type: SmartBrowser
171 Allow: Basic,Browse
172 Frames: 1
173 Add Fields to: EXTERNAL-TABLES
174 Other Settings: PERSISTENT-ONLY COMPILE
177 /* This procedure should always be RUN PERSISTENT. Report the error, */
178 /* then cleanup and return. */
179 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
180 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
181 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
182 RETURN.
183 END.
185 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
187 /* ************************* Create Window ************************** */
189 &ANALYZE-SUSPEND _CREATE-WINDOW
190 /* DESIGN Window definition (used by the UIB)
191 CREATE WINDOW B-table-Win ASSIGN
192 HEIGHT = 12.95
193 WIDTH = 68.86.
194 /* END WINDOW DEFINITION */
196 &ANALYZE-RESUME
199 /* *************** Runtime Attributes and UIB Settings ************** */
201 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
202 /* SETTINGS FOR WINDOW B-table-Win
203 NOT-VISIBLE,,RUN-PERSISTENT */
204 /* SETTINGS FOR FRAME F-Main
205 NOT-VISIBLE Size-to-Fit */
206 /* BROWSE-TAB br_table 1 F-Main */
207 ASSIGN
208 FRAME F-Main:SCROLLABLE = FALSE
209 FRAME F-Main:HIDDEN = TRUE.
211 /* _RUN-TIME-ATTRIBUTES-END */
212 &ANALYZE-RESUME
215 /* Setting information for Queries and Browse Widgets fields */
217 &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
218 /* Query rebuild information for BROWSE br_table
219 _TblList = "TTPL.ActivityStatus"
220 _Options = "NO-LOCK KEY-PHRASE SORTBY-PHRASE"
221 _FldNameList[1] > TTPL.ActivityStatus.ActivityStatus
222 "ActivityStatus" "Status" ? "character" ? ? ? ? ? ? yes ?
223 _FldNameList[2] > TTPL.ActivityStatus.Description
224 "Description" ? ? "character" ? ? ? ? ? ? yes ?
225 _Query is NOT OPENED
226 */ /* BROWSE br_table */
227 &ANALYZE-RESUME
229 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
230 /* Query rebuild information for FRAME F-Main
231 _Options = "NO-LOCK"
232 _Query is NOT OPENED
233 */ /* FRAME F-Main */
234 &ANALYZE-RESUME
238 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartBrowserCues" B-table-Win _INLINE
239 /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */
240 /* SmartBrowser,uib,49266
241 Destroy on next read */
242 /* _UIB-CODE-BLOCK-END */
243 &ANALYZE-RESUME
246 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win
247 /* ************************* Included-Libraries *********************** */
249 {src/adm/method/browser.i}
250 {inc/method/m-drlvwr.i}
252 /* _UIB-CODE-BLOCK-END */
253 &ANALYZE-RESUME
258 /* ************************ Control Triggers ************************ */
260 &Scoped-define BROWSE-NAME br_table
261 &Scoped-define SELF-NAME br_table
262 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
263 ON ROW-ENTRY OF br_table IN FRAME F-Main
265 /* This code displays initial values for newly added or copied rows. */
266 {src/adm/template/brsentry.i}
267 END.
269 /* _UIB-CODE-BLOCK-END */
270 &ANALYZE-RESUME
273 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
274 ON ROW-LEAVE OF br_table IN FRAME F-Main
276 /* Do not disable this code or no updates will take place except
277 by pressing the Save button on an Update SmartPanel. */
278 {src/adm/template/brsleave.i}
279 END.
281 /* _UIB-CODE-BLOCK-END */
282 &ANALYZE-RESUME
285 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
286 ON VALUE-CHANGED OF br_table IN FRAME F-Main
288 /* This ADM trigger code must be preserved in order to notify other
289 objects when the browser's current row changes. */
290 {src/adm/template/brschnge.i}
291 END.
293 /* _UIB-CODE-BLOCK-END */
294 &ANALYZE-RESUME
297 &UNDEFINE SELF-NAME
299 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
302 /* *************************** Main Block *************************** */
304 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
305 RUN dispatch IN THIS-PROCEDURE ('initialize':U).
306 &ENDIF
308 /* _UIB-CODE-BLOCK-END */
309 &ANALYZE-RESUME
312 /* ********************** Internal Procedures *********************** */
314 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE
315 PROCEDURE adm-row-available :
316 /*------------------------------------------------------------------------------
317 Purpose: Dispatched to this procedure when the Record-
318 Source has a new row available. This procedure
319 tries to get the new row (or foriegn keys) from
320 the Record-Source and process it.
321 Parameters: <none>
322 ------------------------------------------------------------------------------*/
324 /* Define variables needed by this internal procedure. */
325 {src/adm/template/row-head.i}
327 /* Process the newly available records (i.e. display fields,
328 open queries, and/or pass records on to any RECORD-TARGETS). */
329 {src/adm/template/row-end.i}
331 END PROCEDURE.
333 /* _UIB-CODE-BLOCK-END */
334 &ANALYZE-RESUME
337 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE
338 PROCEDURE disable_UI :
339 /*------------------------------------------------------------------------------
340 Purpose: DISABLE the User Interface
341 Parameters: <none>
342 Notes: Here we clean-up the user-interface by deleting
343 dynamic widgets we have created and/or hide
344 frames. This procedure is usually called when
345 we are ready to "clean-up" after running.
346 ------------------------------------------------------------------------------*/
347 /* Hide all frames. */
348 HIDE FRAME F-Main.
349 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
350 END PROCEDURE.
352 /* _UIB-CODE-BLOCK-END */
353 &ANALYZE-RESUME
356 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS
357 PROCEDURE send-records :
358 /*------------------------------------------------------------------------------
359 Purpose: Send record ROWID's for all tables used by
360 this file.
361 Parameters: see template/snd-head.i
362 ------------------------------------------------------------------------------*/
364 /* Define variables needed by this internal procedure. */
365 {src/adm/template/snd-head.i}
367 /* For each requested table, put it's ROWID in the output list. */
368 {src/adm/template/snd-list.i "ActivityStatus"}
370 /* Deal with any unexpected table requests before closing. */
371 {src/adm/template/snd-end.i}
373 END PROCEDURE.
375 /* _UIB-CODE-BLOCK-END */
376 &ANALYZE-RESUME
379 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win
380 PROCEDURE state-changed :
381 /* -----------------------------------------------------------
382 Purpose:
383 Parameters: <none>
384 Notes:
385 -------------------------------------------------------------*/
386 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
387 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
389 CASE p-state:
390 /* Object instance CASEs can go here to replace standard behavior
391 or add new cases. */
392 {src/adm/template/bstates.i}
393 END CASE.
394 END PROCEDURE.
396 /* _UIB-CODE-BLOCK-END */
397 &ANALYZE-RESUME