addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Plastic surgery

sitepic_plastica.jpg:
Viewable with Any Browser

Members
Join Now
Login

addedValueMacros.query

Syntax

{addedValueMacros.query(queryID, reportId, sortBy="", sortDirection="", dateFormat="", contextKey=nil, parameterValues="",flTrimSortedByDuplicates=false)}

Examples

{addedValueMacros.query("xx", "xx")}
{addedValueMacros.query("ListingsByCategory", "listings", parameterValues:"xcategory1=Motels&xcategory2=Motels")}
Good example needed here.

Semantics

The query macro performs a "canned" search using the query named queryID, and produces a string using the specified report. SortBy, when specified is is the name of a variable which is used to sort the results returned by the query. Normally the sorted by is set as a property of the query. It can be a variable of any type, including a "computed", "external" or "builtin". Sortdirection and dateformat, when specified, override the report properties of the same name. dateFormat can be a range of standard values shortDate, abbrevDate, longdate but can also include values defined by your system administrator. parameterValues, when provided, overide the default values of query parameters for the purpose of one invocation. The supplied names must match paameters that actually appear in the query. Typically, the query is evaluated in the context of the current message (if any context is needed which is not always true). To override this behaviour, specify a contextKey.

See also

InstanceLabel

if two calls to query macro appear on one page, its is possible for either to have a next or previous link. The links are urls to the same page with search arguments which specify how the continuation should be processed. However there is nothing in the searchargs which uniquely identifies which query is to be continued and which run again, so on continuation page both macro calls rendered as the next page of on of the calls. To overcome this , a new optional parameter instanceLabel can be specified, addedValues will then label all links with the value and not process the searchargs unless the parameter value matches the value from searchargs. It doesn't matter what the value supplied is, it only matters that values specified for 2 different query macro calls be different. If there is only 1 calls to the query macro there's no need to specify a value at all.

b281 - search reports can be associated with queries (query macro) which may have parameters. Previously the parameters were not accessible in the report, now the pseudomacro [[parameter XX]] returns the run time value of the query parameter called XXX. Since the names of the parameter cannot be checked as the report is defined, a check is made that parameter names used in the report actually exist in the query; if not an error is issued and the query doesn't run.