How to filter a list using not contains for certain string.

0
Hello All,     For the list provided, I want to return the item that doesn't contain the words 'Top' or 'Bottom'. For instance, from the list above, I would like to retrieve only 'PIERCING'.   Which string function should I use to achieve this?   Thank you in advance.
asked
3 answers
1

Hi Yogeshwar,

      You can use 

      [not(contains(Attribute,'Top'))]   - This for not contains of certain string

      [contains(Attribute,'PIERCING')]  - This for Contains of certain string

answered
0

Hi Yogeshwar,

 

You can use retrieve activity & the apply xpath

 

If you want only PIERCING then use below condition

[item=PIERCING]

If you do not want top & bottom in the list then use below case

[Item!=Top or item!=Bottom]

 

Hope this answer help.

answered
0

Hey Yogeshwar,

You can use XPath to constraint the data that you can see.

Try to apply this expression on the XPath:

     [contains(AttributeName ,'xxx')] - to only return the data with the excepted value

 

You can can also use the function not(). This functions inverts the meaning.

     [not(contains(AttributeName ,'xxx'))] - only return the data with the inserted value

   

Official doc not function: https://docs.mendix.com/refguide/xpath-not/

Official Doc contains function: https://docs.mendix.com/refguide/string-function-calls/#7-contains

 

If this answer helped, click to Accept :)

 

Best Regards,

Ricardo Pereira

answered