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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
profuse
Creator
Creator

[resolved] tReplace and wildcard?

Hi,
In the tReplace search column can you use a wildcard? If so, what is the wildcard value?
Thanks
Labels (2)
1 Solution

Accepted Solutions
profuse
Creator
Creator
Author

Hi Xdshi,
That works BUT how would I add more than one if-else to the same tMap?
row1.JobTitle.contains("Sales")?"Sales":row1.JobTitle
row1.JobTitle.contains(" Surgeon")?" Physician":row1.JobTitle
Thanks

View solution in original post

4 Replies
Anonymous
Not applicable

Hi,
You can use wildcard in tReplace component, such as:$, *,. Please take a look at component reference :TalendHelpCenter:tReplace with related scenario.
What's your job requirement? Could you please set an example for us?
Best regards
Sabrina
profuse
Creator
Creator
Author

Hi Xdshi,
I have a column that contains Job Titles like: Area Sales Manager, Product Sales or Director of Sales. This is what I would like to do, if this column contains the word sales "sales", I want to replace the entire value such as (Area Sales Manager) to just the word "sales". Can this be done using the tReplace?
Thanks
Anonymous
Not applicable

Hi,
If we understand your requirement very well,  you can use tMap to achieve your goal.
Here is ternary if-else operator in tMap.
The expression should be:condition?(value if true): (value if false)
Please take a look at my screenshots for details
 
Best regards
Sabrina
0683p000009MAyN.png 0683p000009MAyO.png 0683p000009MAyS.png
profuse
Creator
Creator
Author

Hi Xdshi,
That works BUT how would I add more than one if-else to the same tMap?
row1.JobTitle.contains("Sales")?"Sales":row1.JobTitle
row1.JobTitle.contains(" Surgeon")?" Physician":row1.JobTitle
Thanks