Dear visitor, despite all the challenges, our team continues operating at full speed.

We are ready to help with any questions you may have. Please fill out this quick form and we'll get back to you.

Fill the form
Get Free Trial

Filtering string column by contain two different values

Answered
Yordanka Ilieva asked on June 4, 2020

Hello, 
For rows, I select one column from my JSON Data “Title”. I want to filter labels to contains “BG” and “CZ” for example. How can I do this? I see only how to use contain a function for the label only for one of those. 

1 answer

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 5, 2020

Hello,
 
Thank you for your question.
 
Our team would like to draw your attention to the String Query Object. It allows filtering members of the hierarchy depending on their names. The contain condition can be used as well. However, such a filter allows only one condition per time.
 
Even so, the required filtering can be achieved using one of the following approaches:
 
Through built-in UI.
Click the header of the hierarchy you want to filter and click the “Select All” button, removing the selection from all members of the hierarchy. Next, search for the desired part (e.g., “BG”) and click the “Select All” button, adding all filtered members to the table. Such an operation should be repeated each time the new “contain” condition should be added.
 
Implementing custom UI.
Get the list of hierarchy’s members using the getMembers API call provided by Flexmonster. Filter the received array basing on uniqueName property of its elements.
Execute the setFilter method, placing the filtered array as a value of the members property of its parameter.
Please see an example we have prepared using the mentioned approach.
Detailed information about used API calls can be found in our documentation:

 
We hope it works for your case.
Do not hesitate to contact us in case additional questions appear.
 
Regards,
Illia

Please login or Register to Submit Answer