MapSubstring, HTML, Clob, script load error no error message.
I'm fairly new to Qlikview so apologies if any of this is just me being silly.
I am trying to use the MapSubstring function to remove HTML formatting from a Oracle CLOB field retrieved from a QVD.
This is the mapping table:
'<' & TextBetween('<' & SubField([PRLD Asset Long Desc], '<'),'<','>') & '>' as HtmlTag, '' as Substitute
Then I am trying to apply that to the following load from the same QVD:
[PRLD Key] as [%PRLDKeyID],
MapSubstring('PRLD_HtmlTag_Map',[PRLD Asset Long Desc]) as PRLD_Resolved,
I have checked and if I change the mapping load to just a load then I can see HtmlTag and Substitute are populated as expected. When I try and excute the LOAD for PRLDESC then I get no error displayed it just says that the script is finished and then says there has been an error do I wish to reload the last data.
Can anyone tell me what I am doing wrong? Have been stuck on this for days now.
I understand the idea of what you are trying to accomplish, but can't understand your script. Can you post at least one line of [PRLD Asset Long Desc] data to give us an idea? You can anonymize the contained data, I just want to understand the structure.
Every [PRLD Asset Long Desc] value contains multiple HTML tags (e.g. according to the script "them things enclosed in < and >"). Using an ingenious (although not very efficient) trick, Philip maps every (because of the 2-parameter SubField() call) occurence of an HTML tag to an empty string and stores unique copies in a Mapping Table (after reattaching the < & > markers that were lost by calling TextBetween()). He then uses this same mapping table in a MapSubString() call to (try to) obliterate all HTML tags in each [PRLD Asset Long Desc] value.
Problem is that the MapSubString() part ends the script, no error message or anything saying why it just terminates and then I get the usual script has failed do you wish to reload error. But as far as I can see the syntax is correct. I have an idea that the map table seems to contain two blank values so I'm going to test if that is an issue.