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 :
Microsoft Dynamics AX (Archived)

Filter String data types with "<" and ">" on a listpage

(0) ShareShare
ReportReport
Posted on by 1,447

Hi AX people,

As we all know, the field, "Priority" of the table smmLeadTable has a data type of STRING. Basically, my client wants to be able to filter Priorities having less than 30 (Meaning, on the listpage, hit Ctrl+G, type "<30" on the Priority column), but this will be unpredictable simply because the said field is string and not numeric (integer, real, etc.). My solution is to just change the data type from string to int on the smmLeadPriorityTable and smmLeadTable, so using mathematical filter criteria like "<30" or ">=100" will work fine. However, I think that this will have impact on AX. To see what I mean, go to Sales and Marketing > Common > All Leads, hit Ctrl+G and type "<30" or any value on the Priority column of the listpage and you'll see that the filtered results are wrong (the listpage will show values of Priority less than 30 but will also show values greater than 30. What do you think of my solution? I think that this problem is invalid because the user wants to do mathematical filtering on a field that is string data type.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi DJRM,

    Check if there's no modification done in your environment? Works completely fine by default using above mathematical filtering in all forms and the results are correct. Except >=100 ... I would suggest to use >100,100 instead.

    Regards,

    V

  • DJRM Profile Picture
    1,447 on at

    No, there are no customizations. I even replicated this issue by creating new table and form. See below:

    1) Here, I’ve created a form that has 2 columns, the column A has INTEGER data type, and the column B has STRING data type. Notice how AX correctly filters data on the first column.

    7838.f.png

    2) Now, trying to filter on Column B, let’s do “<60%”. The expected result is that the rows that are less than 60 should appear and the rest shouldn’t. Notice that the last two rows are also displayed even though we entered a filter criteria.

    7838.f.png

    This is because the field’s data type under column B is STRING, and AX is treating the values as string literals. What I want to do is without changing the data type of column B to integer (so that < 100, > 100, etc. will work fine), is to make the grid display the correct filtered data which is expected by the user. It's really hard to explain this to the user because what he/she wants is problematic in AX.

  • Muhammad Burhan Zahoor Profile Picture
    145 on at

    You have to use "save as cue" to add & view the record.

    Filter-Cue.png

  • Rati Sharabidze Profile Picture
    612 on at

    Hi,

    You can't filter a string like an integeer (number filtering). In your case, you are filtering it lexicographily, which means that such filter can even show 599999% because the char 6's code is more than the char 5's code. if you want to filter percents, make a new field for it or a computed column. Display methods can't be filtered.

    Best regards

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans