CDW550
This Dynaweb application is used to create an html string, suitable for display on a web page or BBj Html Control. The html can be used for operator entries, or for display of a view based templated data structure.
Calling Format:
CALL "CDW550", Y$, REC$, W550$, HTML$
Input Data Elements |
Y$
|
Session Control |
REC$
|
The templated data structure containing the entry fields and default values. Typically created by calling CDS041 and setting any default values. See example. |
W550$
|
Parameters to CDW550
CC$ | Company Code used for data dictionary access- Required only if different than Y.COMPCODE$ | FILNAM$ | The data dictionary file name describing REC$.
Define the data structure using Data Dictionary Maintenance on FML
menu. | VIEW$ | The view used to describe the data fields to be displayed.
Define the View using the Views Option within Data Dictionary Maintenance on FMS menu. | SUBMITPROG$ | If passed as non-blank, then this program will be run when the Submit button is clicked. | SUBMITTEXT$ | If passed as non-blank, then this text will be used in place of
'Submit' on the Submit button. i.e., 'Next'. | INCCANCEL$ | If passed as "Y" then a link to [CANCEL] will be
included at the bottom of the table in a footer row. | INCBACK$ | If not "N" then a link to [BACK] will be included
at the bottom of the table in a footer row. | INCHOME$ | If not "N" then a link to [HOME] will be included
at the bottom of the table in a footer row. | INCCLOSE$ | If not "N" then a link to [CLOSE] will be included
at the bottom of the table in a footer row. | INCPIPE$ | If not "N" then the pipe symbol | will be included between the
links between the elements on the footer row. | INCTABLE$ | If not "N" then the HTML$ output will include the table tags. Pass as N to enable when it is necessary for the application to add more rows to the table before submitting. | INCCONAME$ | If not "N" then the HTML$ output will include the current company name in the top row of the html table.
You can override the default company name by setting Y.COMPNAME$ to the preferred value before calling CDW550. | SINGLEFOOTERROW$ | If "Y" then the Submit Button will appear in the same row with
the other footer buttons | FILEVERIFYMAX | Smaller files can have all records included in the web page where the user can select from a list. It is not practical to do this on larger files. Set this parameter to exclude each record in the html output if the number of records in the verify file exceed FILEVERIFYMAX . | DEBUG$ | Can be set to a non-blank character to include "&debug="+W550.DEBUG$ in URL to facilitate debugging the
entry page. Requires that SUBMITPROG$ be
non-blank. | ENTRIES | If set to 0, then the generated HTML$ string will include input tags suitable for operator entries on a form. If set to 1 then HTML$ will contain the values entered by the operator as contained in REC$ . This option is useful when including the operator
entries on the bottom of the report being run. Note that you
can also display individual fields, as opposed to entering them on
the form, by setting the Maintenance option to "Q" for Display Only
using View Maintenance. | HEADING$ | CDW550 can also be used to render any data structure in html.
Pass ENTRIES=1 and heading text in HEADING$
to replace the default table heading of 'Entered Values'. | CLASS$ | Pass html table class name here when required to style the table based on css. | LCOPT$ | CDW550 uses CDW000 to build the html table. LCOPT$ is passed to CDW000 for the left column of the table, used for field descriptions. For example, to left justify the field descriptions, pass "l" in LCOPT$ . The left table column will be right-justified if LCOPT$ is not specified. Refer to the CDW000 documentation for a list of all table cell data options. | EXTRAFOOT$ | Text here will be included in the footer row between [HOME] and [CLOSE] . | EXTRAROW$ | Text here will be added to the bottom of the table after the
footer row, before the closing table tags. |
|
Output Data Elements |
HTML$
|
The output string containing the html web page. |
Note that the Data Dictionary 'Description' field is used to populate the left column of the data page.
Set that the View Field 'Type' Column to any of the non-blank values to have a file verified field include the option to select '*** All Records'. The application should check for all asterisks to determine if the user selected the '*** All Records' option.
Set the Maintenance option to "Q" for Display Only using View Maintenance
for any field to be displayed as opposed to entered on the form.
If a data element in the Data Dictionary is a "T" type externally called
program, then CDW550 will call the external program with X100.ACTION$="H"
for entries of the field, and X100.ACTION$="W" for display of the field.
The "T" type program must include routines to handle these action codes.
Example |
Data Dictionary: |
|
View: |
|
Code: |
1300 SETUP: 1310 IF LEN(SC030$)=0 THEN GOSUB DEFAULTS; REM "Set default values only on new entry 1320 CALL "CDS041","CDW550",W550$,"YY"; REM "Obtain W550$ template 1330 LET W550.FILNAM$="SC030" 1340 LET W550.VIEW$="A" 1350 LET W550.SUBMITPROG$="WSC030" 1370 CALL "CDW550",Y$,SC030$,W550$,HTML$ 1380 LET HTML$=HTML$+"[MSG]"; REM "Add error message from validation logic 1390 GOTO EOJ
1400 DEFAULTS: 1410 CALL "CDS041","SC030",SC030$,"YY" 1420 LET SC030.FSCD$=" 1",SC030.TSCD$="100" 1430 LET SC030.FDATE$=DATE(Y.JDATE-10),SC030.TDATE$=DATE(Y.JDATE-1) 1440 LET SC030.FDEL$=DATE(Y.JDATE-10),SC030.TDEL$=DATE(Y.JDATE-1) 1445 LET SC030.TVAL=999999 1450 LET SC030.TSHORT=999 1460 LET SC030.TOVER=999 1470 LET SC030.TDAM=999 1480 RETURN
|
Web Page:
Example using CDW550 to return HTML$ used to show operator entries
at bottom of report. |
2100 ENTHTML: 2120 CALL "CDS041","CDW550",W550$,"YY" 2130 LET W550.FILNAM$="SC030" 2140 LET W550.VIEW$="A" 2150 LET W550.ENTRIES=1 2170 CALL "CDW550",Y$,SC030$,W550$,ENTHTML$ 2180 LET HTML$=HTML$+"<br><br>"+ENTHTML$ 2190 RETURN
|
ResultEntered Values | Include Service Codes from | 43 Overage | through | 45 Damaged | Only Service Codes Entered by (Initials) | EDB | Include Service Codes Entered between | 05/29/08 06/07/08 | Estimated Value Range | 0 10000 | Pieces Range | 0 999 |
|