Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › Is there any way in query to do Like against a List of Values?

    Tagged: Account, Dynamic Query, List, Salesforce Query, String

    • Salesforce® Discussions

      Is there any way in query to do Like against a List of Values?

      Posted by PRANAV on August 31, 2016 at 3:32 PM

      Hi All,

      Is there any way in query to do Like against a List of Values?

      SELECT Id FROM Account WHERE Name LIKE IN:listName

      where listName is a list of string. I can make a dynamic query by doing OR with all the elements, but I was looking for a more elegant way to do this.

      Thanks

      Mohit replied 9 years, 8 months ago 2 Members · 1 Reply
      • Account
      • Dynamic Query
      • List
      • Salesforce Query
      • String
    • 1 Reply
    • Mohit

      Member
      September 1, 2016 at 6:41 AM

      Hi Pranav,

      You can do this by query like :-

      String[] searchitem = {'%searchtext1%','%searchtext2%'};

      List<Accounts> acc = [select id, name from Account where name like :searchitem];

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    [adinserter block="12"]

    Popular Salesforce Blogs

    Salesforce Commerce Cloud: Delivering Innovation with a Difference

    Blog in Salesforce Products

    Dip in revenue, inconsistent customer experience, sluggish pace of operations and straight-jacketed scalability aren’t good for business, but when they become routine, the doom isn’t…

    Commerce Cloud, Commerce Cloud Implementation, Commerce Cloud Solution Partner, Salesforce
    Rahul Oct 30, 2017
    3,805  Views

    Dreamforce 2024: Attendees, Here’s What’s Coming

    Blog in Salesforce

    Dreamforce has always been the crown jewel of tech events, a confluence of innovation, thought leadership, and unparalleled networking opportunities. The excitement surrounding Dreamforce 2024…

    Customer Experience, Dreamforce 2024, Dreamforce 2024 Technology, Dreamforce AI, Dreamforce AI Solutions
    Grazitti Sep 6, 2024
    959  Views

    What does a Salesforce Professional Do? Exploring Salesforce Roles and Profiles

    Blog in Salesforce Career

    There are a number of articles and blogs out there discussing the demand, the salaries, or the need for certification for a Salesforce professional. But…

    Salesforce, Salesforce Admin, salesforce admin roles, salesforce developer roles, salesforce job roles
    Simplilearn May 1, 2019
    2,691  Views

    Popular Salesforce Videos

    Business Days in Salesforce CRM Analytics (Tableau CRM)

    Business Days in Salesforce CRM Analytics (Tableau CRM)

    Video in Analytics

    It's common for businesses to want to take business days into account when showing data on a dashboard in CRM Analytics (formerly Tableau CRM) to…

    Salesforce Training, Salesforce Sales Cloud, salesforce, Apex, Business Logic
    DB Aug 12, 2022
    1,826  Views
    Driving Gamified Interactions on Salesforce Communities With ScoreNotch | Use-Cases

    Driving Gamified Interactions on Salesforce Communities With ScoreNotch | Use-Cases

    Video in Salesforce Communities

    A Salesforce native and lightning-ready product that makes gamification more dynamic and engaging. It encompasses powerful features that boost community engagement and ROI. Do let…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, ROI
    Shubham Mar 25, 2022
    2,046  Views
    Get Rich Insights on Your Salesforce Users With Tableau | Did You Know

    Get Rich Insights on Your Salesforce Users With Tableau | Did You Know

    Video in Salesforce Products

    Did you know you can use Tableau to get rich insights on your Salesforce users? Login history, geo, browser, OS, and more are all at…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, geo, Tableau
    Pooja Aug 4, 2021
    1,679  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.