• Sam Knox
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi there - is it possible to use a wildcard within a contains function? I can't seem to find much on the subject other than where wildcards are related to SOQL or search API. I'd like to use it in a class like this:

if (myAtt.Name.contains('Project' + '%' + 'Budget')) {                    
                myAtt.Name = myAcc.Name + '_' + myAtt.Name;               
                }

These are attachments and I'm trying to find string which contain the word 'Project' and 'Budget' but I need to control for cases where the words are separated with just a space, maybe an underscore, or maybe no spaces at all. I've tried the above syntax and it doesn't work for me. 
Hi there - is it possible to use a wildcard within a contains function? I can't seem to find much on the subject other than where wildcards are related to SOQL or search API. I'd like to use it in a class like this:

if (myAtt.Name.contains('Project' + '%' + 'Budget')) {                    
                myAtt.Name = myAcc.Name + '_' + myAtt.Name;               
                }

These are attachments and I'm trying to find string which contain the word 'Project' and 'Budget' but I need to control for cases where the words are separated with just a space, maybe an underscore, or maybe no spaces at all. I've tried the above syntax and it doesn't work for me. 
In which scenarios should we use Today () & Now () in the formula fields?
  • September 01, 2015
  • Like
  • 0