Hello Everyone, I am facing challenge in matching my attribute to get data from database. For string attributes I can use “contains(CustomerName , $Search/CustomerName)”, it is like in sql “Where CustomerName like %$Search/CustomerName% ” give me the coreect result. but how can do it for integer values, like 12345 is the customerId, then if I give 123, it should search like “where customerId like ‘123’ ”. Thanks in advance for your reply.
asked
Shubham Vijayvargiya
2 answers
2
You can add an attribute to your entity to store a string of all concat attribute values you want to search in. For search you use only this attribute. This increases the simplicity of your search logic. (Of course, you need to keep this updated!)
Example:
Attribute: _SearchString
Value: Mendix 123 Government $199
123 is part of the search string, so you don’t need to cast.
answered
Henri Schellingerhout
0
In the decision you can do contains(toString($customerid), '123')