Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
cbaqir
Valued Contributor

Load Characters After String?

I have a field called DESCRIPTION that stores HTML formatted text (see below) and I want to be able to create 4 separate fields (one for each highlighted section below) with the data after it populated as the field value. Is there anyway to do this in QV?

I was hoping to use something like left(DESCRIPTION, "Current State Summary:") ... to say pull everything between Current State Summary and Problem Statement as the value of Current State Summary.

For example, with the image below (currently all part of DESCRIPTION field), I want this:

Current State SummaryProblem StatementProposed SolutionVoting Statement

Currently when a patient...

... /MD orders.

This current Hospice...

...palliative care goals.

Develop a power plan...

...physicians and bedside nurses.

Requesting to update...

...hospice level of care.

8-28-2017 12-27-50 PM.jpg

1 Solution

Accepted Solutions
MVP
MVP

Re: Load Characters After String?

You should be able to extract the text by using the function TextBetween() like this:

TextBetween( TextBetween( Description , '<b>Current State Summary:</b>' , '<div' ) , '">' , '</span></font>') ;

You might also have to replace the  & nbsp ;   which means non-breaking-space with just a regular space:

Replace( TextBetween( TextBetween( Description , '<b>Current State Summary:</b>' , '<div' ) , '">' , '</span></font>')  , Chr(38)&'nbsp;' , ' ' ) ;

The last three passages does not have a trailing colon immediately after the last character:

Replace( TextBetween( TextBetween( Description , '<b>Problem Statement</b>' , '<div' ) , '">' , '</span></font>') , Chr(38)&'nbsp;' , ' ' ) ;

View solution in original post

3 Replies
MVP
MVP

Re: Load Characters After String?

You should be able to extract the text by using the function TextBetween() like this:

TextBetween( TextBetween( Description , '<b>Current State Summary:</b>' , '<div' ) , '">' , '</span></font>') ;

You might also have to replace the  & nbsp ;   which means non-breaking-space with just a regular space:

Replace( TextBetween( TextBetween( Description , '<b>Current State Summary:</b>' , '<div' ) , '">' , '</span></font>')  , Chr(38)&'nbsp;' , ' ' ) ;

The last three passages does not have a trailing colon immediately after the last character:

Replace( TextBetween( TextBetween( Description , '<b>Problem Statement</b>' , '<div' ) , '">' , '</span></font>') , Chr(38)&'nbsp;' , ' ' ) ;

View solution in original post

cbaqir
Valued Contributor

Re: Load Characters After String?

Thank you!

MVP
MVP

Re: Load Characters After String?

notice that I did an edit due to limitations in the community editor for the & nbsp ; 

it is converted into a real space in the community editor so I had to do the trick with Chr(38) and so forth....