General X++ Development
How do I add multiple ranges to a query in X++?
How do I add multiple ranges to a query in X++?
1 answer
Write an answerAdd each range separately.
qbds.addRange(fieldNum(CustTable, CustGroup))
.value(queryValue('10'));
qbds.addRange(fieldNum(CustTable, Blocked))
.value(queryValue(CustVendorBlocked::No));Separate ranges on different fields are effectively AND conditions.
If you keep changing the query at runtime, make sure you are not accidentally adding the same range over and over.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer