Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Filter AX Grid with Multiple Records without comma separated values

(0) ShareShare
ReportReport
Posted on by 1,159

Hi Guys,

I am having this basic requirement that in a standard AX 2012 R3 Grid form , user should be able to filter records.

However the standard AX filter allows filterations of only one record.

EG.

Grid Form A having Item Itemid in column A having Items Item1 to Item100.

So if a user wants to filter out some random items which he gets in email , he has to rewrite all those items in a notepad with comma separated as shown below.

Item1,Item45,Item56,Item6,Item56.. and so on....

Is there a way that the user can select the items from the excel and just paste it in the filter and it gets filtered.This is something other ERP's offer.

Also the filteration with comma separated is also having some length issues that is the reason user can filter only 20-25 items with comma separated values.

*This post is locked for comments

  • Suggested answer
    Vikas Mehta 21 Profile Picture
    1,159 on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    OK got your point. Thanks a lot

  • Vikas Mehta 21 Profile Picture
    1,159 on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    Thanks

  • Martin Dráb Profile Picture
    233,334 Most Valuable Professional on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    Regarding the code above, it will still run into the limit of length for individual range values. The right solution would be creating multiple query ranges.

  • Martin Dráb Profile Picture
    233,334 Most Valuable Professional on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    If you say that your current solution is cumbersome, use a better solution. Your current design isn't "the only option".

    For example, you may want to utilize your expensive system instead of sending Excel files by e-mail - it's sounds like bypassing the system. Or maybe you should utilize the Excel add-on. I can't be any more specific, because I don't know what data users gets by email, why they then filter something in AX etc.

    If you want a dialog where people will put some text from Excel in a format known at design time, you can build it as a customization.

  • Suggested answer
    PrzemekG Profile Picture
    725 on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    Hi,

    Use this Excel VBA macro to copy items from table and paste them in AX as a string.

    Sub AxaptaStr()

    Dim Slc As Range
    Dim sc As Range
    Dim mStr, rStr As String
    Dim mTxt As DataObject

    Set Slc = Selection
       
    For Each sc In Slc
        If sc.Value <> "" Then
            rStr = sc.Value & ","
            mStr = mStr & rStr
        End If
    Next sc

           
    Set mTxt = New DataObject
    mTxt.SetText mStr
    mTxt.PutInClipboard
           
    Selection.Interior.ColorIndex = 36

    End Sub

    It turns this:

    item1
    item2
    item3
    item4
    item5
    item6
    item7
    item8
    item9
    item10
    item11
    item12
    item13
    item14
    item15

    Into this:

    item1,item2,item3,item4,item5,item6,item7,item8,item9,item10,item11,item12,item13,item14,item15,

    Hope this helps.

    Regards,

    PG

  • Vikas Mehta 21 Profile Picture
    1,159 on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    Hi Martin,

    Thanks for the quick response.

    Apologies for not clearly explaining the requirement.

    I know that there are wild card options and the options available as shared by the link provided by you ,but what we need is that a end user will have random items(not is sequence) which needs to selected from around thousands of items so the only option he is left with is to create a list of items of his requirement in a comma separated format and then filter the grid which is very cumbersome.

    Also the grid filter has limits for the length of the string used to filter.

    So the end user needs some other way around to fix this issue.

  • Martin Dráb Profile Picture
    233,334 Most Valuable Professional on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    You can learn more in Advanced filtering and query options on TechNet.

  • Suggested answer
    Martin Dráb Profile Picture
    233,334 Most Valuable Professional on at
    RE: How to Filter AX Grid with Multiple Records without comma separated values

    No, it's not true that "the standard AX filter allows filterations of only one record" - you can use patterns such as Item1*.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans