Tags search engine

Hi, I’m trying to create a tags (basic) “search engine”, knowing that I must keep 2 separated tabs. It seems to work in the databuilder, but I don’t manage to finish the process in the Layout…

1/ Tab [Search]: ‘tag search’ user specific column

2/ Tab [Content]:

  • ‘tags’ per item to search for in 1 column (tags are separated by commas)
  • ‘split 1’ function of the ‘tags’ column to create a 1st array
  • ‘single’ function to bring the ‘tag search’ user specific value from the [Search] tab
  • ‘split 2’ on the ‘single’ to create a 2nd array
  • ‘relation’ between ‘split 1’ & split 2’
  • ‘lookup’ on the ‘relation’: seems to identify the proper item.

Then, back to the layout:

  • ‘text entry’ component for user to enter tags
  • inline list to filter by the ‘Lookup’: here it fails since, due to the ‘single’ functions, the whole column is filled-in, and I can only ‘filter’ on the ‘lookup’ by ‘is (not) empty’…

=> Where am I wrong?

Many thanks

To confirm, you want a “search” for multiple tags that can return all matching items for those tags, is that correct?

Yes sir!

How about using is included in?

Text entry for user-specific column, then bring that value over to the Sheet where you have tags, filter the inline list by tags is included in user-specific column. Would that work?

Thanks @ThinhDinh,
yes, it does work ; nonetheless, it’s very “constraining”: it seems to impose that the tags searched (ex. recruitment, salary, homework) are fully included in the item’s tag.

Issue: if I have some items with ‘recruitment’ (without 'salary, ‘homework’) and some others with ‘salary’ (idem), they will not appear. Therefore it works if we enter only 1 tag to search for.

This is why I was thinking about the above approach which transforms each tag in a single field-like via ‘split’ > then ‘relations’ between these splits
But at the end of the day, it doesn’t deliver!

Ah yes you’re right, so a split text column on the tags sheet, relate back to the original split text on the entry. Shows item only when relation isn’t empty. Wouldn’t it work?

Yes, this is what I did initially, but I have an issue in the layout with “relation is not empty” *, I would need here “includes”, but it’s not available.

  • Issue that I did not mention - sorry - is that the “tag search” is to refine the search after a “choice component pre- search”. When I use “relation is not empty”, it cancels the previous filter.
    I think that the way I structured the whole search is not appropriate, I should have started with the “tag search” then with the choice component …

Thanks for your (as usual helpful) help!

1 Like

Would this be a good case for multiple lists set with visibility? One for when the tag entry field is empty, and one for when the tag entry field is not empty? I assume your problem is you want a full list when no tags are entered, but once a user starts to type, the relation takes over?

You could also do it a little differently and bring the search tags into the content sheet using a single value column. Then split the tags and build a self relation within the content sheet. Then you can build an if then column first checks if the single value column is empty, then return ‘true’, then check if the relation is not empty, then return ‘true’. Else you would return ‘false’. Then you would just filter the list based on if the if/then column is ‘true’. This should cover if a user entered tags or not with a single list.

2 Likes

Thanks @Jeff_Hager

Yes, you’re right, even if I wanted to avoid this approach of cumulating the inline lists (I’ve always 6 of them in this screen).

I will definetely look at your 2nd approach: I have part of it yet, but not considered the “relation to self” & “ite” approach.
Will let you know, thanks!

1 Like