Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
apoorvasd
Creator II
Creator II

How to find multiple occurrence of a string in a field?

Hello Everyone,

I have a field which has values as shown below. I am trying to fetch the string which is between, '"href="' and '"><img"', i.e., the path of a particular file. But this string can contain more than one "href" value in a single line as shown in below picture. So how can I manage to get all strings between "href" and "img" here? href1.PNG

href2.PNG

When a particular value in this "link" field has only one occurrence of "href", i can use subfield function to get the string. But the problem is when it has more that one "href" value in the same line as shown in second picture above.

Any help on this?

Thank you.

17 Replies
apoorvasd
Creator II
Creator II
Author

Oh yeah, right! thanks for identifying that. The code works now!

But why is that I have to provide whole set of field names in the group by clause for it work?

Thank you.

sunny_talwar

Because, fortunately or unfortunately, that is how the Group By clause work in QlikView.... in order to use Concat (or sum, min, max) you need to add all your non-aggregating fields to the Group By statement

apoorvasd
Creator II
Creator II
Author

Hmm...okay, thank you very much for helping me on this topic!

apoorvasd
Creator II
Creator II
Author

Hi Sunny,

I have an additional question in this topic. I am trying to create a link in the table. As you have shown how to pull multiple occurrences of the strings in same row, I would be converting them to be displayed as a link (using the code, 'link<url>'& Field in my expression) . So, is it possible to have two links in the same row (as we have two strings in the same row)?

Thank you.

sunny_talwar

I would break them into multiple rows (like I showed above) for the purposes on the link table usage

apoorvasd
Creator II
Creator II
Author

Yes, having them in multiple rows works, but I wanted them in same row. Is that possible?

sunny_talwar

I don't think so

apoorvasd
Creator II
Creator II
Author

Okay, thank you.