Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9029525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:16:00+00:00 2026-06-16T07:16:00+00:00

I have some data in an ArrayList and I would like to use that

  • 0

I have some data in an ArrayList and I would like to use that to filter my Linq query using the where clause.

My Linq code below joins two tables and then I filter them using the Where clause. Now I would like to FURTHER filter this query by using the Arraylist as a filter. So the value come from arraylist

I would like the “where” clause to take one more comparison and the value comes from an arraylist:

where rType.Field<string>("ProfSSCMName") == lbProfiles.SelectedValue && rType.Field<string>("Name") == lbHWTypes.SelectedValue && **arrayList.Tostring()**

This is the code that I am using.

Can anyone tell me how can I further filter my Linq query using the values in the arraylist?

joined = from rType in ds.Tables["HWTypes"].AsEnumerable()
         join rStock in ds.Tables["Stock"].AsEnumerable()
         on rType.Field<string>("ProductID") equals rStock.Field<string>("Partno")
         where rType.Field<string>("ProfSSCMName") == lbProfiles.SelectedValue && rType.Field<string>("Name") == lbHWTypes.SelectedValue
         select new
         {
             TagNumber = rStock.Field<string>("TagNumber"),
             SerialNumber = rStock.Field<string>("SerialNumber"),
             Partno = rStock.Field<string>("Partno"),
             PartType = rStock.Field<string>("PartType"),
             EcopartSubtype = rStock.Field<string>("EcopartSubtype"),
             AzertyQuerty = rStock.Field<string>("Azerty/Querty"),
             ProductID = rType.Field<string>("ProductID"),
             Name = rType.Field<string>("Name"),
             SCCMKeyboard = rType.Field<string>("SCCMKeyboard"),
             DisplayName = rType.Field<string>("DisplayName"),
             ProfSSCMName = rType.Field<string>("ProfSSCMName"),
             TagNameDisplayName = rStock.Field<string>("TagNumber") + " " + rType.Field<string>("DisplayName")

             // add the other columns you need here
         };
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:16:01+00:00Added an answer on June 16, 2026 at 7:16 am

    You seem to be using Linq-To-Objects.
    So you can just use contains on the arraylist

    where rType.Field<string>("ProfSSCMName") == lbProfiles.SelectedValue 
    && rType.Field<string>("Name") == lbHWTypes.SelectedValue 
    && arrayList.Contains( rType.Field<string>("Name") )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data that I would like to visualize. Each byte of the
I have some data structures, and I would like to use one as a
I have some data from log files and would like to group entries by
I would like to make use @IndexColumn to set seq number of some data
I have some data that is stored in a TIMESTAMP(6) WITH TIMEZONE column in
I have some data that won't printf.... echo works, but not printf There is
I have a JavaFX app with a some code like this... public class MainListener
I have some code that uses the Java Apache POI library to open a
I need to have some sort of data structure that can contain heterogenous subclasses
I have some repetitive code that is used by a few of my actions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.