<< Click to Display Table of Contents >> Navigation: Reference > Pre-processor > Tips for using new PP |
Always enclose set references and ODBC cell references in square brackets. This avoids ambiguity and is easier to read. For example:
[*set NewIndex=[dsMine.ThisOne]]
…to get the value from the data set.
Always enclose file, worksheet and column names in quotes even if they do not contain spaces:
[*dbopen dfExcel=’MyFile.xls’]
[*dbloop dlThisRow = dfExcel;’Sheet1’;’Value’,’Name’]
[*dbopen dfAcc=’MyFile.bdb’]
[*dbloop dlRow = dfAcc;’Questions’]
Always enclose text within single quotes if you want to treat it as text.
When the text in an index is referred to, always use @ to make sure that the exact text is used. For example:
[*set NewIndex=’[@MyText]’]
…to get the text from the index.
When the text in a data set is referred to always enclose in quotes. For example:
[*set NewIndex=’[dsMine.ThisOne]’]
…to get the text from the data set.
To use a database as a lookup table use [*DBFINDROW] and [*LAST], for example:
[*dbfindrow FoundRow = dfFile;’Sheet1’;’Response’=’NA’]
[*dbloop dlFoundRow = (FoundRow)dfFile;’Sheet1’]
[*last dlFoundRow]
[*set FoundText = dlFoundRow.’Text’]
[*dbend dlFoundRow]