Skip to content

Latest commit

 

History

History
75 lines (59 loc) · 3.6 KB

File metadata and controls

75 lines (59 loc) · 3.6 KB
title description author ms.author ms.reviewer ms.date ms.topic ms.subservice search.audienceType contributors
attribute element
Use this element to specify which columns in the containing entity or link-entity element should be returned.
pnghub
gned
jdaly
07/12/2024
reference
dataverse-developer
developer
JimDaly
dmitmikh
dasussMS
apahwa-lab
DonaldlaGithub

attribute element

[!INCLUDE attribute-description]

Learn how to select columns using FetchXml.

Example

<fetch>
  <entity name='account'>
    <attribute name='name' />
    <link-entity name='contact'
      from='contactid'
      to='primarycontactid'
      link-type='inner'
      alias='contact'>
      <attribute name='fullname' />
    </link-entity>
  </entity>
</fetch>

Attributes

Name Required? Description
aggregate No The aggregate function to apply. Learn how to aggregate data with FetchXml
alias No The name of the column to return. Each column must have a unique name. You'll use aliases when you retrieve aggregate values. Learn more about column aliases.
dategrouping No When you group data by a datetime value, this attribute specifies the date part to use. See Date grouping options
distinct No When you use the aggregate countcolumn function, this attribute specifies that only unique values for the column are returned. Learn more about distinct column values.
groupby No When you aggregate data, this attribute specifies the column to use to group the data. Learn more about grouping.
name Yes The logical name of the column.
rowaggregate No When this value is set to CountChildren a value that includes the total number of child records for the record is included in the results. Learn how to use this attribute.
usertimezone No Used by aggregate queries that group by datetime columns. Depending on the time zone, the same datetime value can fall in different days. Learn about grouping by parts of a date

Use this attribute with a false value to force the grouping to use UTC value. When you don't set this attribute, the default value is true, and the user's time zone is used.

Note: With QueryExpression, the grouping always uses UTC. When using the SDK FetchXmlToQueryExpressionRequest class, this setting is lost. There's no way to set this using QueryExpression.

Parent elements

Name Description
entity [!INCLUDE entity-description]
link-entity [!INCLUDE link-entity-description]

Aggregate functions

Use these aggregate functions. Learn how to aggregate data with FetchXml

[!INCLUDE aggregate-function-table]

Date grouping options

Learn more about grouping by parts of a date

[!INCLUDE dategrouping-table]

[!INCLUDE footer-banner]