How to make all lables searchable in custom tableViewRow

You must Login before you can answer or comment on any questions.

Looking at the kitchen sink app Table View (Layout 2). I would like to be able to search all the text from the various labels in the row and not just the title text.

Currently, in the search field, if I type "Got" the search returns no rows, but if I type "Fred" then it returns all rows.

How can I make the other labels searchable? Thanks!!!

![search](http://i39.tinypic.com/4jxqtj.png "Search")

!["Got"](http://i42.tinypic.com/16gzsis.png "Got")

1 Answer

Hi there,

I believe the property you'd use is: filterAttribute.

In order to search across multiple fields you could try concatenating the relevant field values into a single field and set that to your filterAttribute.

Give it a try, be interesting to see if it works.

Cheers, Chris.

— answered 3 years ago by Chris Reed
answer permalink
1 Comment
  • Just wanted to comment that it does indeed work, you need to add a space in between elements though like such:

    row.hiddenfilter = name + ' ' + description;
    And then use:
    filterAttribute:'hiddenfilter'

    — commented 2 years ago by Walker Williams

Your Answer

Think you can help? Login to answer this question!