Database functions

Top  Previous  Next

Function name:

Usage:

RowNum

RowNum

Returns the row number of the current record within the current dataset.

Notes:  Because SQL does not include a row number as part of its specification, this RowNum function is created by Crash Magic and has several requirements and caveats:

The RowNum function is only provided when the query includes an "ORDER BY" clause.  It does not check that the order by clause creates a unique sort order, but that is also a requirement to have a valid RowNum.  

The RowNum function, as it acts on the current dataset, does not correspond to the same record in a different dataset.  It is specifically the index of that record in the current dataset only.

If data is added to, or removed from the database that would affect the current query, the RowNum function will be refreshed and may not correspond with prior reports that used RowNum.

<FieldName>

<FieldName>

All field names for the current query are available as "calculated fields" and will be displayed alongside functions

Qurery_Number

Returns a value from a query. Query_Number( "Query Name", "Where clause parameter:Data type="Value"; ["Where clause parameter:Data type="Value"];[...],"","Query field name")

Example:

Query_Number("Volume", "PrimaryStreet:String=" + LocationList.Street(1,"Name") + ";" + "CrossStreet:String=" + LocationList.Street(2, "Name") + ";", "", "AvgVolume")