Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Help

Hi All,

I have a text box that contains the following and works great:

='The following item(s) could not be found: ' &

concat( if(wildmatch(vFound,'*'&subfield(vItemNum,' ',ValueLoop(1,vAnum,1))&'*'),NULL(),subfield(vItemNum,' ',ValueLoop(1,vAnum,1)) ) ,'  ')&'

When the user enters a value in the Input Box, it loops through the values and determines if the record exists or not.  It was meant to be only an error message if a record was not found.  However, now I need it to display 'All values requested were found in the data set.' if the value is null. I tried an IF statement and kept getting an Error in Expression message. Can anyone figure out what the expression should be?

Also, I would like it to now use commas instead of spaces. The text box currently looks like this:

Capture.JPG

I want it to say "The following item(s) could not be found: 123456789, 987654321"

Thanks for the help everyone!

1 Reply
MayilVahanan

HI

Did you mention like this?

if(len(concat( if(wildmatch(vFound,'*'&subfield(vItemNum,' ',ValueLoop(1,vAnum,1))&'*'),NULL(),subfield(vItemNum,' ',ValueLoop(1,vAnum,1)) ) ,',')) > 0,'All Values are found', 'Error message')

For comma separate, use like is

concat( if(wildmatch(vFound,'*'&subfield(vItemNum,' ',ValueLoop(1,vAnum,1))&'*'),NULL(),subfield(vItemNum,' ',ValueLoop(1,vAnum,1)) ) ,',')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.