Description of CMS's Add Record Response files. I. Introduction CMS can use "Add Record Response" files to customize the response returned after entry of new records. Add Record Response files should contain HTML elements that will generate an HTML file that will be returned to clients after a record has been added. They should also contain special "replaceable strings". These "replaceable strings", which will be "replaced" by CMS, make it easy to properly format an Add Record file (so that it delivers an informative message). II. Usage Links of the format syntax should be inserted into your home page, or other web-accessible document (assuming that rfile.ext is the Add Record Response file, and that a_def_file.def is the "definitions file" for the dataseries). Click here to add a new record Or, if you want to also want to specify a custom Add-Record file (file2.ext): Add a record Hint: you can use the "link creater tool" option (provided by the CMS main page) to create a link element that you can cut & paste. How it works: a) When this type of link is clicked, SREhttp/2 fires up the CMS_ADD component of CMS. b) CMS will create a (possibly customized) form that contains fields for the variables in the CMS dataseries. c) After the client submits this form, CMS will create a new record 9 (using the entered values). d) If a respfile= has been specified, CMS will look for this file relative to the Output-File directory (as defined when you created the CMS dataseries), or in the CMS\FILES directory. e) CMS will then replace the special "replaceable strings" with values specific to this just entered record (such as the record number), and CMS will then send this now-modified file to the client. ADD_RESP.HTM is an example of such a "properly formatted Add Record file". You can use it as a starting point for your own, customized, needs. Whether you start from scratch, or modify ADD_RESP.HTM, you'll need to appropriately use the "replacaeable strings". What follows is a description of these "replaceable strings". III. The Add-Record-Response file "replaceable strings" These "replaceable strings" have the following format: where: * A_NAME MUST BE CAPITALIZED * there are NO SPACES between the The following A_names are used. To repeat, they MUST BE capitalized: CURRENT_DATETIME : The current date and time (in GMT) SERIES : The name of this dataseries DESC : Short description of the dataseries RECID : Record id of the record just added LENGTH : length (in bytes) of the record just added TOTALRECORDS: Total # of records in dataseries (after adding the new record) VARS : a space delimited list of the variables in the dataseries. If an Abstract was specified, its name will be $ABSTRACT. VARSET : a space delimited list of the variables that were set VARNOTSET : a space delimited list of the variables that were not set VARTYPES : a space delimited list of the types of the variables in the dataseries Note: the vartypes are 1 : single line string N : a number M : multiple line string C : 0/1 checkbox F : uploaded file (or downloaded URL) S : a "select-list" A : an "abstract" (reserved for the $ABSTRACT variable) %VARNAME : A variable from the CMS dataseries (that the record was added to) For example, to display the "abstract", use (assuming that the "Include an ABSTRACT variable?" option was selected when the dataseries was defined) Or, to display a MyNAME variable, use If you enter a VARNAME that does NOT exist for this dataset, the element (say the ) will be left as is. Note: In the Add-Record files, the %VARNAME syntaxx is used to "auto-generate" an input field. In the Add-Record-Response fiels, the %VARNAME syntax is used to display the value of the VARNAME variable (for the just added record). IV. Examples

Record has been added at

The dataseries (), now has records.

Your name: Abstract you entered: Warning: some variables were not included in the form: