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 pass two enum values in Query filter using x++

(0) ShareShare
ReportReport
Posted on by 535

Hi All,

How to pass two enum value into query filter using x++?

For e.g: In PO, we have status (Open order, invoiced, received). I want to see only invoiced and received. if i click one check box, it has to show only "Received"&"invoiced" status.

For this, i need to pass two enum values instead on passing string value to filter the same.

Help me here if anyone knows. 

I have the same question (0)
  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Vignesh,

    You can try to use

    queryBuildRange.value(enum2str(XX::Received),enum2str(XX::Invoiced));

  • Vignesh R Profile Picture
    535 on at

    I'm getting an error(The wrong number of arguments has been specified for the function.)

    If use above code.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    HI Vignesh,

    Use strFmt().

    queryBuildRange.value(strFmt('%1,%2', enum2str(ABC::A),enum2Str(ABC::B)));

  • Vignesh R Profile Picture
    535 on at

    Hi,

    I got my solution using below using query

    queryBuildRange.value(Global::queryRangeConcat(enum2str(xx::Received), enum2str(xx::Invoiced)));

    thanks for your help.

  • Verified answer
    Blue Wang Profile Picture
    Microsoft Employee on at

    HI Vignesh,

    If you use Global::queryRangeConcat.

    I think it should like:

    queryBuildRange.value(Global::queryRangeConcat(queryValue(enum2str(xx::Received), enum2str(xx::Invoiced))));

    OR

    queryRangeConcat(SysQuery::value(xx::Received), SysQuery::value(xx::Invoiced))ï¼›

    
                          

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans