Hoppa till huvudinnehållet

How to apply a query task on the feature layer that queries all the feature in the feature layer based on the Facilty_ID values inside the ilist.?

Kommentarer

3 kommentarer

  • Permanently deleted user
    Any Idea??

     

    Thanks in advance.

     

    Majdoleen
    0
  • Permanently deleted user
    Hi Majdoleen, 

     

    It sounds like you would want to flatten that list down into a string, so that you can make a where clause that looks something like this:

     

    Facilty_ID IN ('GHC0001', 'GHC0002', 'GHC0003')
    1. Add an Assign before the QueryTask.
    2. On the left side of the Assign, use a new string variable (eg, facilityIdsString)
    3. On the right side, use this expression: String.Join("','", iList1)
    4. That will populate your facilityIdsString variable so that it looks something like GHC0001','GHC0002','GHC0001
    5. Combine the variable and the rest of the missing formatting needed in the Where property of the QueryTask: "Facility_ID IN ('" + facilityIdsString + "')"
    There's also the RelationshipQueryTask if your table and layer are published with a relationship on ArcGIS Server.

     

    Hope that helps!

     

    -Amanda
    0
  • Permanently deleted user
    Thanks for this - it was exactly my scenario as well, and Amanda's solution worked like a charm.

     

     

    -Jena
    0

Du måste logga in om du vill lämna en kommentar.