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

    How to Communicate With Customers During Uncertain Times | Salesforce Guide

    Blog in Salesforce

    How do you communicate with your customers when they’re facing uncertainty? How do you move beyond basic customer transactions and create memorable, human moments? Is…

    Audience and Customers, Businesses, Campaigns, Communicate With Customers, Communication Channels
    LevelShift (formerly DemandBlue) Dec 10, 2020
    2,503  Views
    What is Pardot? What is Engagement History in Salesforce in 2023?

    What is Pardot? What is Engagement History in Salesforce in 2023?

    Blog in Others

    Pardot is a software as a service (SaaS) marketing automation platform by SalesForce offering email automation, targeted email campaigns, and lead management for B2B sales…

    Engagement History, Engagement History Dashboard, pardot, Pardot AI, Prospects and Leads
    Mohit Kumar Jan 10, 2023
    2,693  Views

    How to create custom Lookup in Lightning Component

    Blog in Lightning

    Hi guys, Its time to use Lightning Component Framework. This framework is used to build a SPA. SPA is not a massage therapy as you…

    Lightning Component, Lightning Component Framework, Lightning Lookup, Salesforce Custom Lookup, Salesforce Lightning
    Prafull Apr 25, 2016
    44,213  Views

    Popular Salesforce Videos

    Get Started with Salesforce Order Management in Commerce Cloud

    Get Started with Salesforce Order Management in Commerce Cloud

    Video in Salesforce Cloud Platform

    This video will give you an overview of Salesforce Order Management and how to get started with implementing and using the application. In this session…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Application
    Prafull Aug 19, 2022
    1,982  Views
    Salesforce To RDS Integration Through Dell Boomi | Salesforce Tutorial

    Salesforce To RDS Integration Through Dell Boomi | Salesforce Tutorial

    Video in Salesforce Integration, Salesforce Training

    Salesforce to RDS integration through Dell Boomi. This tutorial will cover the following points - 1. Introduction Take a quick glimpse at integrating accounts from…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Dell Boomi
    Algoworks Dec 23, 2020
    2,946  Views
    Send Salesforce Field Service Mobile App Device Logs For iOS

    Send Salesforce Field Service Mobile App Device Logs For iOS

    Video in Salesforce Training

    This video will demonstrate how to send device logs from the Field Service App for iOS / Android. Salesforce Support may ask you to send…

    Mobile app, Salesforce Video, Salesforce Learning, Salesforce Support, Salesforce Taining
    Praful Apr 13, 2021
    5,108  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®.

    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.