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

Notifications

Announcements

No record found.

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
    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
    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
    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans