Показать сообщение отдельно
Старый 24.11.2012, 22:09   #6  
Kent is offline
Kent
Участник
 
46 / 10 (1) +
Регистрация: 24.01.2007
Цитата:
Сообщение от gl00mie Посмотреть сообщение
That's not quite correct, it works for other field types, too, but you have to format literals in a slightly different way. E.g. string literals must be enclosed in double quotes and dates must be formatted in X++ way (yyyy\mm\dd).
Hi, I tried, but without result:

Query q = new Query();
QueryBuildDataSource qbds;
QueryRun qr;
QueryBuildRange qbr;
CustTable custTable;
;
qbds = q.addDataSource(tablenum(CustTable));

qbr = SysQuery::findOrCreateRange(qbds, fieldnum(CustTable, AccountNum));
qbr.value(strfmt('((%1 == %2) || (%3 == %4))',
fieldStr(CustTable, AccountNum),"000015",
fieldStr(CustTable, InvoiceAccount),"000023"));
qr = new QueryRun(q);
if (qr.prompt())
{
while (qr.next())
{
custTable = qr.get(tablenum(CustTable));

info(strfmt("AccountNum: %1; InvoiceAccount: %2", custTable.AccountNum, custTable.InvoiceAccount));
}
}