I have a table that records the name of uploaded documents, up to 14 per record. The columns are named thus:
TABLE tblDocuments
COLUMNS documentID (int, not nu
Queries can be accessed (like structs) with a string index and square brackets, but only if you also include the desired row number (!). This works like a two-dimenisonal array.
(current file name: #HTMLEditFormat(qryGetDocs["document#i#"][qryGetDocs.CurrentRow])#)
Note the HTMLEditFormat()
to protect yourself against cross site scripting attacks. This is important! Never ever output data to HTML without properly escaping it. (I admit that filenames are an improbable attack vector because they usually cannot contain pointy brackets, but a) you can't be too cautious, b) it's a good habit to get into, and c) no one knows what security holes will pop up when the code gets re-factored at some point in the future. Not HTML-escaping data is inexcusable sloppiness.)
A more idiomatic and much more readable version would be:
(current file name: #HTMLEditFormat(DocName)#)