Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mkudis
Contributor
Contributor

Text inside a string

I have a field (log_message) that is a large string of data that I would like to pull a particular piece of text from, but the string is not always the same values in the same position.  Is this possible?  An example of the string is:

Status update applied:  Branch ID:  Texas Tran: 123456-1 Type: XX Orig Status: S New Status: D User jdoe Date/Time Tue Apr 6

then the next row of data may be something like

Related image applied: Branch ID: Texas Tran: 123456-1 User: jdoe Date/Time: Tue Apr 6

So I basically will always need to pull the first 6 digits of information after 'Tran: ' 

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist II
Specialist II

=SubField (SubField(log_message,'Tran:',2),'-1',1)

Untitled.png

View solution in original post

4 Replies
jwjackso
Specialist II
Specialist II

=SubField (SubField(log_message,'Tran:',2),'-1',1)

Untitled.png

View solution in original post

rwunderlich
MVP & Luminary
MVP & Luminary

Or

TextBetween(log_message, 'Tran:', '-')

-Rob

mkudis
Contributor
Contributor
Author

Doesn't seem to be working with either expression.  Wondering if it has to do with the string itself, as I would expect this to return it pretty easily.

 

The issue may be the type of sheet object I am using.  What type of sheet object would I use to show this data correctly?

rwunderlich
MVP & Luminary
MVP & Luminary

Either expression should work in a table object where the Dimension is log_message.

-Rob