How to use "Like" operator in the QueryBuildRange.Value
To make something as the "LIKE" operator in a query, you should just assign a value to the queryRange including a wildcard.
The query framework will then change the statement into a LIKE statement. If the value does not contain a wildchard the query framework will change the statement to ==.
Example:
static void QueryBuildRange_Like(Args _args){ Query query = new Query(); QueryRun queryRun; QueryBuildDataSource queryDataSource; QueryBuildRange queryRange; CustTable custTable; ;
queryDataSource = query.addDataSource(tablenum(CustTable));
queryRange = queryDataSource.addRange(fieldnum(CustTable, Name)); queryRange.value('The*'); queryRun = new QueryRun(query); while (queryRun.next()) { custTable = queryRun.get(tablenum(CustTable)); info (custTable.Name); }}
This posting is provided "AS IS" with no warranties, and confers no rights.
2010年5月21日 星期五
2010年5月19日 星期三
2010年5月18日 星期二
Docu:copy
Docu:copy(SalesLine, CustInvoiceTrans) is used to duplicate a document handling note's record in table DocuRef. This static method doesn't copy entire fields of SalesLine to CustInvoiceTrans, but it duplicates the document note's record belongs to salesLine to custInvoiceTrans' document note. It will then modify refTableId, refRecId, and refCompanyId (data area company account id) which was previously set specificto salesLine to CustInvoiceTrans
select docuRef index RefIdx
where docuRef.RefCompanyId == projProposalJour.DataAreaId &&
docuRef.RefTableId == projProposalJour.TableId &&
docuRef.RefRecId == projProposalJour.RecId;
select docuRef index RefIdx
where docuRef.RefCompanyId == projProposalJour.DataAreaId &&
docuRef.RefTableId == projProposalJour.TableId &&
docuRef.RefRecId == projProposalJour.RecId;
訂閱:
文章 (Atom)