web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to use AND condition in query range

(1) ShareShare
ReportReport
Posted on by 230
Hi Team,
 
In query range i need to use ABC_CombinationTable.Device is not equal to 1, 2, 5, 8 
 
Below code i am using.
 
qbdsCombinationTable.addRange(fieldNum( ABC_CombinationTable, Device)).value(SysQuery::valueNot(1));qbdsCombinationTable.addRange(fieldNum( ABC_CombinationTable, Device)).value(SysQuery::valueNot(2));qbdsCombinationTable.addRange(fieldNum( ABC_CombinationTable, Device)).value(SysQuery::valueNot(5));qbdsCombinationTable.addRange(fieldNum( ABC_CombinationTable, Device)).value(SysQuery::valueNot(8));
But it is giving me OR condition.
 
And i want to set AND condition.
 
Please let me know how to set AND condition.
I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,829 Moderator on at
    Hi,
     
    Try like below and let us know the results.
    qbdsCombinationTable.addRange(fieldNum( ABC_CombinationTable, Device)).value(SysQuery::valueNot(1) + ',' + SysQuery::valueNot(2) + ',' + SysQuery::valueNot(5) + ',' + SysQuery::ValueNot(8));
    If above one doesn't work, you need to use expression in query ranges.
     
    Thanks,
    Girish S.
     
  • CU21091228-0 Profile Picture
    230 on at
    Thanks Girish, Working.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 629 Super User 2025 Season 2

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 444 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans