Jump to content

How to filter data using multi line input box

Sanandh C k

Recommended Posts

Hii guys,

I need to filter the data based on values enter in multiline input box. I have checked this one using find function but its not working properly.

Eg: I have student details data (student id, student name). I have creted a multiline text box property for searching student id. I have created a table chart for display student details and I want to filter the chart based on student id in Multiline in put box. The problem is if I enter student id 1the data table display student id 1, 11, 21 etc .


Please help me If you have any solution




Link to comment
Share on other sites

Try using a Multi-line Input Property control to enter the IDs you want to filter. You can then use that to create a calculated column in your table with an expression like:


if(find([studentID],"$map("${MatchStudentID}", "&")")>0, "Yes", "No" )


where "MatchStudentID" is the name of the property control you created. You can then use Show/Hide in the visualization to only show rows where this column is set to "Yes".

Link to comment
Share on other sites

Assuming you have a multiline Input Field with a row separated list of values you want to match exactly, like:


John Doe

Mary Janeyou can do this in "Properties > Data > Limit data using expression"with an expression like:


Find("," & [NAME] & ",","," & RXReplace("${multilineString}","n",",","") & ",")>0



This wraps each value in commas so that we ensure complete matches only. That includes at the beginning and end of each string, and replaces the new lines in the input string with those same separators

Link to comment
Share on other sites

  • 2 years later...

I keep trying this but my expression only returns the first UWI(API) in my list. Here is my expression whic is just a copy of the one above.


Find("," & [uWI] & ",","," & RXReplace("${UwiListFilter}","n",",","") & ",")>0


I watched the Dr. Spotfire video and it works fantastic.  But for me it limits the search to my first item in the list. What am I missing



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...