String Trim function in search xpath

0
I am using a Add-on widget (Dropdown - Static) while  adding a new search attributes under Static options tab, I need to add a XPath that contains only trim values of a particular attribute. Currently I am writing like this: [Note != NULL and Note != empty and Note !=''] but this is taking blank notes as well that contains only spaces. I want to remove them.  Please consider these examples :  a    b     b                                   c here example 1 have leading and trailing and in between spaces. example 2 have trailing spaces. example 3 have only spaces. example 4 have leading spaces. from this example I just want to remove example 3rd one,  Please suggest if there is a way as I am new to Mendix. Thanks in advance.  
asked
2 answers
0

If you are considering notes that start with whitespace, i.e., not trimming the spaces in between characters. Then you can use this starts-with function to query for those that does not start with a whitespace. 
Please see documentation for this function 
xpath-starts-with

answered
0

In Xpath, only available option relevant to this scenario are these functions. Please look through and see if you are able to figure out a solution. 

https://docs.mendix.com/refguide/xpath-starts-with

https://docs.mendix.com/refguide/xpath-ends-with


https://docs.mendix.com/refguide/xpath-contains

All functions list

If you can somehow manipulate your data at the time it is stored in database, like I described in above comment that leading and trailing whitespaces are trimmed using trim function in a microflow when data is committed. In that case, the not(starts-with) function will work fine

answered