SQLViewValue

Returns the value of a field in a SQL view.

Syntax

SQLViewDSNValue(docID, dsn, primaryKey, fieldName, filter)
docID = unique ID of the document describing the SQL view
dsn = external SQL source to use (if empty, use the data source declared in the SQL view doc)
primaryKey = value of the primary key identifying the row whose value you want to read
fieldName = name of the field whose value you want to retrieve from the list
filter = list of parameters needed to execute the SQL view

Remarks

This function's parameters are case-sensitive. Returns #ERR! in the event of an error.

Example

If you have access to a view of Qubes documents with a parameter for the document's state, the syntax will be:

@@SQLViewValue('SQLxxx', 'DSN', PKEY, 'NAME', List('state',4)) // to find the name of the document identified by PKEY with a matching state (code 4) @@

PKEY will need to be replaced with the value of the primary key that you want

Classification

Qubes