Qlik Community

Ask a Question

Community Corner

Discussion board for questions about the Qlik Community Platform as well as general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
samp1
Contributor
Contributor

Return substring after every occurrence word

I have a text field I am trying to return the value as in output which is in double codes after a specific value("text":) as in the below example, thanks for your help.

example:

TextFieldOutput
[{"id":"38hH6C","text":"NYC","extra_text":null},{"id":"K2kkam","text":"Phili","extra_text":null}]NYC;Phili
[{"text":"NYC","id":"38hH6C","extra_text":null}]NYC
[{"text":"NYC","id":"38hH6C","extra_text":null},{"text":"Washington DC","id":"T84lzU","extra_text":null}]NYC; Washington DC

 

Labels (4)
1 Solution

Accepted Solutions
samp1
Contributor
Contributor
Author

@Sue_MacalusoI am using Qlik Sense, I fixed myself by using multiple replace functions wherever I see the extra characters.

 

View solution in original post

3 Replies
QFabian
Specialist II
Specialist II

Hi @samp1 , please vheck if this works for you.

I just assumed that yor data sample where 3 rows.

///i prefered mto do it with precedent loads, or it cloud be a very large expression 

 

Data:
LOAD @1 as TextField
FROM
[C:\Users\Fabian\Desktop\data.txt]
(txt, codepage is 28591, no labels, delimiter is '\t', msq);

Result:
Load
TextField,
mid(B, 1, FindOneOf(B, '","')-1) as C
;
Load
TextField,
mid(A, FindOneOf(A, 'text') + 7) as B
;
Load
TextField,
subfield(TextField, '},{') as A
Resident Data;
drop table Data;

QFabian
Sue_Macaluso
Community Manager
Community Manager

@samp1 Are you using QlikView or Qlik Sense. I know this was answered but I would like to move it to the right product forum. Thanks!

Sue Macaluso
samp1
Contributor
Contributor
Author

@Sue_MacalusoI am using Qlik Sense, I fixed myself by using multiple replace functions wherever I see the extra characters.

 

View solution in original post