Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • 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, 12 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

    Popular Salesforce Blogs

    Lightning Web Components — Build Lightning Fast Salesforce Apps

    Blog in Lightning

    Salesforce launched Lightning Web Components as part of Spring ’19 pre-release to enable a quicker and easier way to program applications on the Salesforce Lightning platform. It…

    Aura Components, Aura Components to Lightning Web Components, CSS, Customer Experience, Javascript in Salesforce
    LevelShift (formerly DemandBlue) Feb 8, 2019
    3,583  Views
    Salesforce Training

    Why and How’s of Salesforce Training

    Blog in Salesforce Training

    Imagine you buying a CRM for your sales team after taking time to evaluate, test, and negotiate with the vendor and not use it eventually.…

    Ask Questions, Blog, Business Process, Businesses, Checking Multiple Tools
    Cloudideas Apr 26, 2021
    3,838  Views

    From Keyword-Based Knowledge Bases to AI-First Portals: Why Customer Support Needs to Evolve

    Blog in Salesforce

    Customer expectations are at an all-time high. Whether they are students trying to access enrollment details, patients asking about billing, or policyholders checking their claim…

    CRMJetty Nov 11, 2025
    175  Views

    Popular Salesforce Videos

    Non-technical But Want to Build Career in Salesforce?

    Non-technical But Want to Build Career in Salesforce?

    Video in Salesforce Stories

    In this video Shrey gave the answer to the following questions: 1. What is the next step after doing Certification in Salesforce Administrator? 2. How…

    Salesforce Training, Salesforce Tutorial, Salesforce Certification, Salesforce Administrator, salesforce knowledge
    Jogender Oct 12, 2021
    1,705  Views
    Salesforce CPQ Implementation Best Practices

    Salesforce CPQ Implementation Best Practices

    Video in Salesforce Implementation

    Follow these Salesforce CPQ implementation best practices across various phases for optimal results: Preparation phase, Implementation phase, Customization, User adoption, and Post Implementation phase. Each…

    Salesforce Implementation, Salesforce CPQ, CPQ, Selling with Salesforce CPQ, Salesforce CPQ Consultation
    Emorphis Sep 5, 2025
    203  Views
    How to Connect Salesforce Billing Payment Gateways (COMPILATION)

    How to Connect Salesforce Billing Payment Gateways (COMPILATION)

    Video in Salesforce Training

    In this compilation, we’ll show you what you need to know about using your preferred payment gateway with Salesforce Billing + CPQ - like how…

    Salesforce Training, Salesforce Tutorial, salesforce, CPQ, Salesforce Video
    Pooja Jun 14, 2022
    1,830  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.