Search for string and filter tag Tag Browse Component

Hello All,

I have Tag browse component and want to filter tags with the string provided. I did similar for Alarm status table and works great but some how it does not work for this component. Most likely I am missing something.
I have text box where user will input the string which is linked to window custom property called 'searchString'.

Let me know if you have any proven method to do it or if you have any suggestions.

Thank you

Just use the search filters built into browse:

system.tag.browse("path", filters={'name': "*{}*".format(searchString)})

Sorry but where do I put this code?

Why? The component already does this for you.

@Urvish_Mehta I think your issue here is that when looking for a substring in another string, case matters, so since you are using the lower function on searchString you need to also use it on

As an aside, there is no need to use str() here, is already a string.

You might want to use tag.fullPath though, the user may be trying to match something that isn't in the tag name itself.

Oh I didn't notice it was a component, I thought he was talking about the tag browse function...

1 Like