12.07.2015 Views

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

<strong>Zen</strong> TablesSet tWHERE = ""// Build WHERE clause based on filtersIf ($GET(pInfo.filters("Name"))'="") {Set tWHERE = tWHERE _ $SELECT(tWHERE="":"",1:" AND ") _"Name %STARTSWITH '" _ pInfo.filters("Name") _ "'"}If ($GET(pInfo.filters("Title"))'="") {Set tWHERE = tWHERE _ $SELECT(tWHERE="":"",1:" AND ") _"Title %STARTSWITH '" _ pInfo.filters("Title") _ "'"}Set sql = "SELECT " _ tSELECT _ " FROM " _ tFROMSet:tWHERE'="" sql = sql _ " WHERE " _tWHERESet:tORDERBY'="" sql =sql _ " ORDER BY " _tORDERBY _ $SELECT(tSORTORDER="desc":" desc",1:"")Set tRS = ##class(%ResultSet).%New()Set tSC = tRS.Prepare(sql)Set pInfo.queryText = sql}Quit tRSThe following table describes the properties on the %ZEN.Auxiliary.QueryInfo object that appears in the signature for bothcallback methods.Like tablePane, the dataCombo, dataListBox, and repeatingGroup components can also use callbacks to generate a componentfrom a %ResultSet. Some of the properties in the QueryInfo object apply only to tablePane queries. dataCombo, dataListBox,and repeatingGroup ignore any table-only properties, including those for columns, filters, and sorting.Only tablePane and dataCombo support the queryText property.Table 1–2: QueryInfo PropertiesPropertycolumnExpressioncolumnsfilterOpsfiltersfilterTypesgroupByClauseorderByClauseparmsqueryExecutedqueryTextDescriptionThe colExpression values from each in the . columnExpressionorganizes these values as a multidimensional array subscripted by colName.The colName values from each in the . columns organizes thesevalues as a multidimensional array subscripted by column number (1–based).The filterOp values from each in the . filterOps organizes thesevalues as a multidimensional array subscripted by colName.The filterValue values from each in the . filters organizes thesevalues as a multidimensional array subscripted by colName.The filterType values from each in the . filterTypes organizesthese values as a multidimensional array subscripted by colName.The groupByClause value for the , if supplied.The orderByClause value for the , if supplied.Multidimensional array, subscripted by parameter number (1–based).This array containsany input values provided by elements within the .Set this property to true in the method identified by OnCreateResultSet, to indicate thatthe newly created %ResultSet has already been executed and you do not want themethod identified by OnExecuteResultSet to be called. The default is false.The method identified by OnCreateResultSet can set this value to the actual querytext, to be displayed if the showQuery value is true.10 <strong>Using</strong> <strong>Zen</strong> <strong>Components</strong>

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

Saved successfully!

Ooh no, something went wrong!