Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
CSmith1605109986
Contributor
Contributor

replace expression in tMap

Hi

Beginner alert!

I am having trouble replacing two items of text in the tMap expression editor.

I can replace the text: /Published/ with nothing using the following:

in.ReportPath.replace("/Published/","")

But I also want to replace more text in the same column.

For example:

/University/Pub/

How do I add the text: /University/Pub/ into: in.ReportPath.replace("/Published/","") so both /Published/ & /University/Pub/ gets replaced with nothing (removing the text from column)

Thanks

Chris

Labels (3)
1 Solution

Accepted Solutions
evansdar
Contributor II
Contributor II

use replaceAll to catch multiple conditions. Something like this

 

ReportPath.replaceAll("/Published/|/University/|/Pub/","")

View solution in original post

2 Replies
evansdar
Contributor II
Contributor II

use replaceAll to catch multiple conditions. Something like this

 

ReportPath.replaceAll("/Published/|/University/|/Pub/","")

CSmith1605109986
Contributor
Contributor
Author

Thanks, that works great.