Xpath constraint to filter the data (based on mult-select values)
Hi, I have to query/retrieve data from a table and filter our based on certain values of a column. The number and values that I need to filter out is gathered through multi-select from the user. something like Xpath constraint [Application = 'PCM' or Application = ‘LMS’ or Application = ‘QMS’ or …….] I have built the Xpath query string using microflow and java action. However, my query does not work /return any results, if there are more than one value. My syntax is like this. [Application = $JavaXPathQueryStr] What am I doing wrong? I tried displaying the $$JavaXPathQueryStr, it looks correct (if I hard code the values like above)). However, it is not returning any results, if I have more than one value above like hardcoded equivalent [ [Application = 'PCM' or Application = ‘LMS’] What am I doing wrong or can we use only one value? Any guidance is appreciated
We can use only one value.
Since you have your query string built up already, it will be easy to make $JavaXPathQueryStr have this string
Application = 'PCM' or Application = ‘LMS’
and in the XPath constraint box say
Tim v Steenbergen
If you want to do this in a microflow, i am afraid you have to do a seperate retrieve for every value and then add the lists together.
Maybe you want to look at the appstore component called gridsearch, which generates the xpaths client side.
Performance is much better and you do not loose the option to sort and page your search results as you would when you would use a microflow datasource (assuming you are not using mendix 8 yet.)