x++ code to define or conditions in querybuildrange for different fields

Hello,

I need OR condition for different fields in query range.

here is my code.

I have tried to keep different query range object but it is taking AND condition

qbr_ContractYr2 = qbds_contractYr.addRange(fieldNum(uerContractYear, BeginningDate));
qbr_ContractYr2.value(QueryValue(sysquery::range(fromDt, toDt)));

qbr_ContractYr3 = qbds_contractYr.addRange(fieldNum(uerContractYear, EndingDate));
qbr_ContractYr3.value(QueryValue(sysquery::range(fromDt, toDt)));

 

Even though i tried to keep same query range object it is taking AND condition.

qbr_ContractYr2 = qbds_contractYr.addRange(fieldNum(uerContractYear, BeginningDate));
qbr_ContractYr2.value(QueryValue(sysquery::range(fromDt, toDt)));

qbr_ContractYr2 = qbds_contractYr.addRange(fieldNum(uerContractYear, EndingDate));
qbr_ContractYr2.value(QueryValue(sysquery::range(fromDt, toDt)));

 

How will achieve OR condition for different fields in this case please suggest

Parents Reply Children
No Data
Related
Recommended