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 10 years, 2 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

    Top Salesforce Spring '23 Service Cloud Features

    Blog in Salesforce

    With the all-new Salesforce Spring '23 Service Cloud features discover new capabilities that will assist you and your team provide efficient, high-quality service. Share links,…

    Automate Procedures, Automated Workflows, Built-in Inventory, Business Goals, Customer Service
    Apphienz Feb 27, 2023
    1,859  Views
    production

    Develop in Production: Insane or Inspired?

    Blog in Salesforce

    Accelerating implementation We all know the benefits of accelerating and streamlining the release cycle; the business is more agile and reduced development effort. But there…

    Business, Business Processes, Custom Code, Data Privacy Assessment, Dependency Tree for Metadata
    Ian Jul 28, 2020
    3,411  Views

    Exploring the Latest Advancement with Salesforce Einstein Copilot's General Availability

    Blog in Others

    Salesforce announced today during its World Tour NYC that Salesforce Einstein Copilot, its conversational AI assistant for CRM, is now generally available. Einstein Copilot was…

    CloudMetic Solutions, Copilot Actions, Copilot Analytics, Copilot Builder, Copilot Recommendations
    Cloudmetic May 13, 2024
    1,744  Views

    Popular Salesforce Videos

    Who Should Use SFRA and PWA? | Salesforce Commerce Cloud

    Who Should Use SFRA and PWA? | Salesforce Commerce Cloud

    Video in Salesforce Automation

    Different organizations need different architecture according to their needs. Organizations who want their website built on the latest technology and modern approaches can go towards…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Commerce Cloud, Salesforce Video
    Cyntexa Aug 25, 2022
    1,837  Views
    Pass Salesforce Certification Exam In Your First Attempt

    Pass Salesforce Certification Exam In Your First Attempt

    Video in Salesforce Stories

    This Salesforce Training Video will help you understand the concepts of Salesforce and Salesforce exam so that you can pass the Salesforce exam in the…

    Salesforce Training, Salesforce Certification, Salesforce Developer, Salesforce Community, Salesforce Tools
    Simplilearn Apr 23, 2019
    1,893  Views
    Marc Benioff talks Salesforce - AT&T deal, office health safety and online media regulation

    Marc Benioff talks Salesforce - AT&T deal, office health safety and online media regulation

    Video in Salesforce Stories

    Salesforce’s Customer 360 will enable AT&T to deliver highly-tailored customer experiences seamlessly across retail, marketing, online, business, and more. AT&T will utilize Salesforce’s entire portfolio…

    salesforce, Salesforce Einstein, Salesforce Video, Sales Cloud, Tableau
    Pooja May 29, 2020
    2,329  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.