Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Reko_freed
Contributor III
Contributor III

Display an icon in Vizlib advanced Text object based on a condition

I want to show a tick in vizlib advanced text object v1.7.12 if a column consists of a value say 'EXT.' else show cross (X)

what I have tried - if(col_name = 'EXT.', <p><i class = "fa fa-check"></p>, <p><i class = "fa fa-close"></p>)

but it's not working.

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

Does the if() part of your statement work? That is, if you replace the condition with 1=1 does the True aspect show and 1=0 the false aspect shows?

[Edit] Looks like at the very least you're missing the string quotes:

if(col_name = 'EXT.', '<p><i class = "fa fa-check"></p>', '<p><i class = "fa fa-close"></p>')

View solution in original post

5 Replies
Or
MVP
MVP

col_name = 'EXT' will check if the only possible value in col_name is 'EXT'...

Have a look at this for checking if a value exists in a column:

https://community.qlik.com/t5/QlikView-App-Dev/Check-if-a-particular-value-is-present-in-a-field-s-l...

Reko_freed
Contributor III
Contributor III
Author

Each and every value of that column should be 'EXT.' that is my condition

Or
MVP
MVP

Does the if() part of your statement work? That is, if you replace the condition with 1=1 does the True aspect show and 1=0 the false aspect shows?

[Edit] Looks like at the very least you're missing the string quotes:

if(col_name = 'EXT.', '<p><i class = "fa fa-check"></p>', '<p><i class = "fa fa-close"></p>')

Reko_freed
Contributor III
Contributor III
Author

Thanks @Or, it's now working

Reko_freed
Contributor III
Contributor III
Author