Drop down filter foir string in data grid 2

0
Question: Hello, Is it possible to use a dropdown filter for a string attribute in Data Grid 2 in Mendix? At present, I'm encountering an error stating that it's only supported for boolean and enum attributes.
asked
3 answers
5

In Data Grid 2, the Dropdown filter only supports:

  • Enumeration attributes, and

  • Boolean attributes.

That’s why you’re seeing the error:

“Dropdown filter is only supported for Boolean and Enumeration attributes.”

For String or Association (string-based) attributes, the Dropdown filter is not supported.

 

Workaround 

 Use a Text filter instead

If you just want to search/filter text:

  • Use the Text filter component instead.

  • Create a DS microflow for the datagrid and add a decision for filtering options. 

answered
2

Hello Shreyansh,

 

No this is not possible. Unless you're using a reference to another object.

 

What is your usecase? If you want to use a drop-down for filtering, and the column you're trying to filter on is free-text (String), what drop-down values would you expect? There would be an unlimited amount of values.

answered
0

No this is not possible, as String attributes can have millions and billions possibilities, dropdown filter is not possible for Strings.

If you know that your attribute has limited set of data, either create an ENUM or Create a reference to other data source so that the dropdown filter can be applied.

 

answered