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, 1 month 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

    Insert Record using JavaScript Remoting with Visualforce Page

    Insert Record using JavaScript Remoting with Visualforce Page

    Blog in Others, Visualforce

    Hey there! We must have heard about javascript remoting. So today we are going to learn about how to use the Javascript remoting to build…

    Custom Table, DML Operation, Insert Record, Javascript in Salesforce, JavaScript Remoting
    Parul Sep 28, 2018
    5,752  Views
    How to Capture Replies in Salesforce by using Email services?

    How to Capture Replies in Salesforce Using Email Services?

    Blog in Coding and Scripting, Sales

    When you are sending Email by using trigger then you have to implement these codes in your trigger - String[] toAddresses = new String[] {lead1.email};…

    Email Service, Email Services in Salesforce, Salesforce Apex, Salesforce Apex Code, Salesforce Apex Email Services
    Rajan Mar 13, 2018
    29,696  Views
    Control Access to Object

    Learn About Control Access to Object | Salesforce

    Blog in Salesforce

    If you want to control any type of data access then the easiest way is to assign permission on that specific object. Objects can be…

    App, Applications, Assign a Profile, Contract Manager, Control Access
    kishan Nov 11, 2021
    4,055  Views

    Popular Salesforce Videos

    What is a Salesforce Architect?

    What is a Salesforce Architect?

    Video in Salesforce Training

    If you are not familiar with the ‘Solution Architect’ role then it can be explained relatively simply. Solution Architects are ultimately responsible for the ‘Solution’…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Algoworks Apr 29, 2021
    1,355  Views
    Fillable PDFs for Salesforce Field Service

    Fillable PDFs for Salesforce Field Service

    Video in Salesforce Field Service Platform

    The ability to generate fillable PDFs for Salesforce Field Service can be a powerful tool. We demonstrate how to use PDFLib, a JavaScript library that…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Field Service
    DB Mar 24, 2022
    1,904  Views
    Salesforce Mobile Publisher Demo

    Salesforce Mobile Publisher Demo

    Video in Salesforce Stories, Mobile, Salesforce Apps

    With Salesforce Mobile Publisher, you can create pixel-perfect mobile applications for employees, customers, and partners. Check out this video and learn all you need to…

    salesforce, Salesforce Apps, Salesforce Video, Customers, Salesforce Learning
    Pooja Sep 30, 2020
    2,289  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.