RE: AOT Query range on one column with OR condition of another column.
Thank Martin for your help. I am now able to filter on the query. by adding range like below.
(DOCUMENTSTATUS == 0),(DOCUMENTSTATUS != 0 && TESTCONFIRMATIONSTATUS == 1)
I am trying to add similar range from X query on form DataSource but not sure why it is not working. Even in the info as well i am getting below query but my form DataSource is not filtering the record according to this query.
SELECT FIRSTFAST FORUPDATE * FROM NCABAllSOLinesView(TESTAllSOLinesView) WHERE (((TESTAllSOLinesView.DocumentStatus == "0") || ((TESTAllSOLinesView.NCABConfirmationStatus == "1") && (TESTAllSOLinesView.DocumentStatus != "0"))))
Below code is in the data source execute query.
this.query().dataSourceTable(tableNum(TESTAllSOLinesView)).addRange(fieldNum(TESTAllSOLinesView,DocumentStatus)).value(
strFmt('(%1.%2 == "0") || ((%1.%3 == "1") && (%1.%2 != "0"))',tableStr(TESTAllSOLinesView),fieldStr(TESTAllSOLinesView, DocumentStatus),fieldStr(TESTAllSOLinesView, TESTConfirmationStatus)));
Query q2 = new Query(this.query());
info(strfmt("%1",q2));