Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
vsabbise
Creator
Creator

Change color of Substring in Whole text

Hi All,

Is there a way to Highlight or Change the color of a sub string in the whole text ? . I am using a variable to input a substring and displaying the whole text in a text box. I can use Upper(variable name) but looking for something similar to blue(variable name).

I have this:

(if(SubStringCount((wholetext),vWord1)>0,Replace(wholetext,vWord1,upper(vWord1))))

I want this:

(if(SubStringCount((wholetext),vWord1)>0,Replace(wholetext,vWord1,Blue(vWord1))))

 

 

Labels (3)
9 Replies
Anil_Babu_Samineni

This it enough, I hope

if(SubStringCount((wholetext),vWord1)>0, Blue())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vsabbise
Creator
Creator
Author

No this is just returning RGB(0,0,128).

I need the entire text to be returned with substring entered in the variable to be colored.
Anil_Babu_Samineni

Can you please share sample file to test? Did you use - Measure expression
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vsabbise
Creator
Creator
Author

I can explain what I am asking for again. Lets say my wholetext = "Qlik sense is a useful tool from Sweden".

I have my variable input box entered as useful.

I need my text box to have the text with useful in blue color "Qlik Sense is a useful tool from Sweden"

Anil_Babu_Samineni

In KPI - Answer is NO. Do you have any extension?
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vsabbise
Creator
Creator
Author

I am using input box using qsvariable extension and expression in the text box.

Anil_Babu_Samineni

Difficult to say, Without seeing anything. I could help - If you can share sample for me.
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vsabbise
Creator
Creator
Author

All I need is how to change a string color using expression in Qlik Sense text box expression.

 

 

Anil_Babu_Samineni

Again saying that, If i understand the question correctly. Answer is NO. That means, If you have string called "Welcome to Qlik" in that you want to use?

If(SubStringCount('Welcome to Qlik',vWord1)>0, Blue()) // where vWord1 is Qlik. You want to make that in high light color? Like this.

Your output should be this in Qlik KPI? If so, I suggest to use 

Welcome to Qlik

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful