Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 Summary | Problem Statement | Proposed Solution | Voting 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. |
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;' , ' ' ) ;
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;' , ' ' ) ;
Thank you!
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....