1 Reply Latest reply: Oct 4, 2012 6:48 PM by mayilvahanan ramasamy RSS

    Expression Help

    Rebecca Molstad

      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!

        • Re: Expression Help
          mayilvahanan ramasamy

          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)) ) ,',')