Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

what am I doing wrong?

I am extracting the string in between the string tags from the below xml. 


<entry key="Cause of Removal" value="Associate Activity"/>
<entry key="Date">
<entry key="Removed Access">
<String>Test New Ent</String>

<String> Test New Ent2</String>

<String>Test New Ent3</String>
<entry key="Requestee" value=" (OE17YR)"/>


This is the script I am using: 

IF (ACTION = 'Remove Role Access', TextBetween(Replace(Replace(Replace(Replace(ATTRIBUTES,chr(10),' '),' ', ''), '<String>', ''), '</String>', chr(10)), '<entrykey="RemovedAccess"><value><List>', '</List>')) As [Removed Roles]


However, all the spaces in between the string is replaced with non space. In the script, when I replace the non space with space, it does not work. Script runs but does not bring in anything. Any help would be appreciated. Thanks . 

Labels (3)
2 Replies
Partner - Specialist
Partner - Specialist

Hi Diwaskarki,

I think you can try to use textbetween first, like:

IF (ACTION = 'Remove Role Access', Replace(Replace(Replace(TextBetween(ATTRIBUTES,'<entry key="Removed Access">','</List>'),'<value>' & chr(10) & '<List>',''),'<String>',''),'</String>','')) As [Removed Roles]

Please try.

Aiolos Zhao

Creator II
Creator II

that did not work.