Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master
Partner - Master

what is wrong in my script?

Hello
I got a table called CASES_PEGA in which there is a field called PYDESCRIPTION which contains HTML tags
I'm trying to strip HTML codes and keep the text of PYDESCRIPTION field
I'm using the following script:

HtmlTag_Map:Mapping
LOAD DISTINCT
'<' & TextBetween('<' & SubField(PYDESCRIPTION, '<', IterNo()),'<','>') & '>' as HtmlTag,
'' as Substitute
Resident CASES_PEGA
While NOT IsNull(SubField(PYDESCRIPTION, '<', IterNo()));

Left Join(CASES_PEGA)
temp:
Load Distinct
CASE_ID
,MapSubstring('HtmlTag_Map', PYDESCRIPTION) as Field_Cleansed
Resident CASES_PEGA;

However I'm getting a GENERAL SCRIPT ERROR when executing the MapSubstring

kindly advise

I can walk on water when it freezes
12 Replies
ali_hijazi
Partner - Master
Partner - Master
Author

thank you @rwunderlich, and @sunny_talwar for your replies

So the problem is in the MapSubstring() function

the thing is that I posted the question in QlikView related space but I'm actually running this script in Qlik Sense so I cannot use the suggested alternative of writing a macro

Kindly advise

I can walk on water when it freezes
rwunderlich

You may be able to use the RexEx Connector https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Data-So... using the pattern I gave in the macro. 

-Rob

polisetti
Creator
Creator

Hi @sunny_talwar / @rwunderlich ,

Just wanted to check the alternative approach in the above case. I am facing the same issue and looking for another approach to remove all the HTML tags <> from a field. Could you please help me out????

Thanks,

Jaswanth P