QueryBuildRange

I have 2 questions regarding this issue. 1-I have added querybuildrange object for CustTrans, field-Invoice. I have to show on CustOpenTrans form only records which have Invoice field in this table empty: queryBuildRangeInvoiceEmpty.value(’’); It does not work, selects all records. I tried to use variable: locInvoiceId=’’; queryBuildRangeInvoiceEmpty.value(locInvoiceId); It does not work either. In table browser it selects correct records when i write: select CustTrans where CustTrans.Invoice=’’; 2-How to specify a few values in the range? I tried: locInvoiceId=‘123,456’; queryBuildRangeInvoiceEmpty.value(locInvoiceId); Does not work. Selects only the first value: ‘123’. Please help. thank you

Hi, 1 - try using: queryBuildRangeInvoiceEmpty.value(sysquery::valueEmptyString()); 2 - the invoice is a string not integer so you need to specify accordingly: queryBuildRangeInvoiceEmpty.value("‘123’,‘456’")); Regards, Ciprian

thank you. For the second question i have used following: this.query().dataSourceNo(2).addRange(fieldNum(CustTrans,Invoice)).value(‘123’); this.query().dataSourceNo(2).addRange(fieldNum(CustTrans,Invoice)).value(‘456’); … etc. It worked fine.

  1. queryBuildRangeInvoiceEmpty.value(’!?*’); 2. locInvoiceId=‘123…456’; Will work.

Hi, - From my experience, I would like to use std function of Axapta for QUESTION 2 as: queryRangeConcat(queryvalue(123), 456)) Khue Trinh