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

Announcements

No record found.

News and Announcements icon
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,833 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

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... 583 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 378

#3
Diego Mancassola Profile Picture

Diego Mancassola 255

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans