21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Back to Script Statements and Keywords (page 219).<br />

Comment Field<br />

Provides a way of displaying the field comments (metadata) from databases and spreadsheets. Field names<br />

not present in the document will be ignored. If multiple occurrences of a field name is found, the last value<br />

is used.<br />

The keyword can be used to read comments from a data source using the following syntax:<br />

comment *fieldlist using mapname<br />

*fieldlist is a comma separated list of the fields to be commented. Using * as field list indicates<br />

all fields. The wildcard characters * and ? are allowed in field names. Quoting of field<br />

names may be necessary when wildcards are used.<br />

mapname is the name of a mapping table previously read in a mapping load or mapping select<br />

statement (see Mapping (page 253)).<br />

The map table used should have two columns, the first containing field names and the second the comments.<br />

To set individual comments the following syntax is used:<br />

comment fieldname with comment<br />

Example 1:<br />

fieldname is the name of the field that should be commented.<br />

comment is the comment that should be added to the field.<br />

commentmap:<br />

mapping load * inline [<br />

a,b<br />

Alpha,This field contains text values<br />

Num,This field contains numeric values<br />

];<br />

Example 2:<br />

comment fields using commentmap;<br />

comment field Alpha with Afieldcontainingcharacters;<br />

comment field Num with *A field containing numbers’;<br />

comment Gamma with ‘Mickey Mouse field’;<br />

Back to Script Statements and Keywords (page 219).<br />

Comment Table<br />

Provides a way of displaying the table comments (metadata) from databases or spreadsheets. Table names not<br />

present in the document are ignored. If multiple occurrences of a table name is found, the last value is used.<br />

The keyword can be used to read comments from a data source using the syntax:<br />

comment tables tablelist using mapname<br />

where<br />

226

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!