Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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
Rob, in your example you use the StripHtml function.
qlik sense does not exist this function,
do you know if there is an alternative?
You could use the RegEx connector with the replace function: https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Data-So...
-Rob