
I’m setting up a QueryRange and found that if I pass my filter field an empty string the query doesn’t run the range.
I would have expected all records where the range field is empty to be shown but not…
How can I solve this problem? Easy!! Instead of using an empty string I use the SysQuery::valueEmptyString() method
Here is an example
Query query;
QueryRun queryRun;
QueryBuildDatasource qbds;
QueryBuildRange qbr;
query = new Query();
qbds = query.addDataSource(tableNum(ProjTable));
qbr = qbds.addRange(fieldNum(ProjTable, Name));
qbr.value(SysQuery::valueEmptyString());