編輯

共用方式為


filter element

Specify complex conditions for an entity or link-entity to apply to a query.

Learn how to filter rows using FetchXml.

Example

<fetch>
  <entity name='account'>
    <attribute name='name' />
    <filter type='and'>
      <condition attribute='address1_city'
        operator='eq'
        value='Redmond' />
    </filter>
  </entity>
</fetch>

Attributes

Name Required? Description
type No Use and or or. Whether all (and) or any (or) conditions within the filter must be met.
hint No Use this attribute to set the union hint to get a performance benefit for a specific type of query. Learn how to use the union hint
isquickfindfields No Use this attribute to tell Dataverse to execute the query as a quick find query. About quick find queries
overridequickfindrecordlimitenabled No See Quick find record limits and Apply the quick find record limit
overridequickfindrecordlimitdisabled No See Quick find record limits and Bypass the quick find record limit

Parent elements

Name Description
entity Specifies the child element for a fetch element, the 'parent entity' for the query. Only one entity is allowed.
link-entity Joins a table related to the entity or link-entity to return additional columns with the result. Also used with filter elements to apply conditions on column values in related tables.

Child elements

Name Occurrences Description
condition 0 to 500 Specify conditions for entity and link-entity row values which must be true to return the row. The condition operator attribute specifies how to evaluate the values.
filter 0 or many Specify complex conditions for an entity or link-entity to apply to a query.
link-entity 0 or many Used when filtering on values in related records