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, 3 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

    application solution

    Popular Salesforce Blogs

    Salesforce Customer Portal: Features, Industry Use Case, and Benefits

    Blog in Salesforce

    The ideal features in a customer portal may vary depending on the industry, business needs, and the types of customers that the portal is meant…

    Better Data Management, Customer Portal, customizable, Data Analytics, Education Industry
    CRMJetty Apr 24, 2023
    2,140  Views

    Salesforce Administrator Roles And Responsibilities

    Blog in Salesforce Consultant

    Salesforce is a cloud-based platform that helps a business organisation in managing valuable customer database efficiently. It provides highly automated services that allow the sales…

    CRM, Marketing Cloud, Salesforce, Salesforce Administrator, Salesforce Application Developers
    Ethan Gilmore Mar 19, 2020
    11,394  Views

    How can Salesforce CRM be used for Small Businesses?

    Blog in Others

    With straightforward tools, a connected app, and Salesforce dashboards & analytics, small businesses can develop a thorough picture of their present and potential customers. By…

    Applications, Audience Builder, Business-customer Relationships, Certified Salesforce Consulting Company, Channels for Communication
    Hexaview Mar 22, 2023
    2,653  Views

    Popular Salesforce Videos

    Salesforce Guide to Sharing Architecture

    Salesforce Guide to Sharing Architecture

    Video in Salesforce Training

    The Salesforce sharing model is an essential element in your organization's ability to provide secure application data access. Therefore, it's crucial to architect your sharing…

    Salesforce Training, Salesforce Guide, Salesforce Video, Salesforce Learning, Salesforce sharing model
    Prafull Feb 22, 2022
    2,655  Views
    Introduction to Salesforce Shield Platform Encryption | Salesforce Tutorial

    Introduction to Salesforce Shield Platform Encryption | Salesforce Tutorial

    Video in Salesforce Security

    Introduction to Salesforce Shield Platform Encryption 0:00 Introduction 1:00 Shield Platform Encryption 2:35 Need for Shield Platform Encryption 3:18 Classic Encryption Vs Shield Platform Encryption…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Learning, Platform Encryption
    Abhishek Jun 15, 2022
    1,669  Views
    Salesforce For Beginners - Introduction To Salesforce | Salesforce CRM Developement Tutorials

    Salesforce For Beginners - Introduction To Salesforce | Salesforce CRM Developement Tutorials

    Video in Salesforce Training

    Contents for this Salesforce Training Video: 1:05 - Index 1:31 - What is CRM ? (Customer Relationship Management) 2:17 - What is Salesforce CRM? 3:18…

    CRM, salesforce services, Salesforce Learning Steps For Beginners, Best Salesforce Tutorials, Free Salesforce Tutorials
    Jogender Dec 18, 2018
    1,674  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

    © 2025 - 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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.