SummaryCard shows one figure, large, under a label — an open pipeline, a count of cases, a win rate — and SummaryCards lays several out in a row that wraps on a narrow screen. A card shows a value you give it, a column of the record it's on, or a figure Dataverse works out over records: a total, average, minimum, maximum or count, formatted by the server in the user's culture. The same on Blazor and React.
<SummaryCards>
<SummaryCard
label="Open pipeline"
fetchXml={OPEN_DEALS}
columnName="estimatedvalue"
aggregate={QueryAggregate.Sum}
format="C0"
/>
...
</SummaryCards><SummaryCards>
<SummaryCard Label="Open pipeline"
FetchXml="@OpenDeals"
ColumnName="estimatedvalue"
Aggregate="QueryAggregate.Sum"
Format="C0" />
...
</SummaryCards>Inside a record context, RelationshipName (relationshipName in React) keeps the records to those related to the record, as a SubGrid does. With a FetchXml or ViewId as well, its filters choose among them; without, every related record counts. A count needs no column: it counts the records. The figure is worked out again when the record context refreshes or saves, and a record not yet saved has none. The Account 360 demo has four across the top of an account.
<RecordContext table="account" id={accountId}>
<SummaryCard
label="Contacts"
relationshipName="contact_customer_accounts"
aggregate={QueryAggregate.Count}
/>
</RecordContext><RecordContext TableName="account" RecordId="@accountId">
<SummaryCard Label="Contacts"
RelationshipName="contact_customer_accounts"
Aggregate="QueryAggregate.Count" />
</RecordContext>Without an Aggregate (aggregate), ColumnName (columnName) shows the record's own value of the column, formatted as its form shows it. Value (value) shows a figure the page works out itself.
<SummaryCard label="Est. revenue" columnName="estimatedvalue" /><SummaryCard Label="Est. revenue" ColumnName="estimatedvalue" />Caption (caption) puts a line under the figure. With CaptionAggregate (captionAggregate), {0} in it is a second figure over the same records, worked out in the same request. With OfFetchXml or OfViewId (ofFetchXml, ofViewId), the card shows its figure as a share of the same figure over those records: a percentage, with a bar under it unless ShowProgressBar (showProgressBar) is false.
<SummaryCard
label="Win rate"
fetchXml={WON_DEALS}
ofFetchXml={CLOSED_DEALS}
aggregate={QueryAggregate.Count}
caption="{0} deals won"
captionAggregate={QueryAggregate.Count}
/><SummaryCard Label="Win rate"
FetchXml="@WonDeals"
OfFetchXml="@ClosedDeals"
Aggregate="QueryAggregate.Count"
Caption="{0} deals won"
CaptionAggregate="QueryAggregate.Count" />OnClick (onClick) makes the card a button: a click, Enter or Space raises it. Href (href) makes it a link, which opens in a new tab like any other; in React, onNavigate follows it through your router on a plain click.
Four figures over every deal in the demo's data: the open pipeline and how many deals make it up, the average open deal, the revenue won, and the share of closed deals that were won. Click the pipeline to list its deals. Money is in the organization's base currency.
Name | Type | Default | Description |
|---|---|---|---|
Aggregate | QueryAggregate? | The figure to work out over the records: a Models.QueryAggregate on its own, not a combination. Unset, the card shows SummaryCard.ColumnName's value on the cascading record. | |
Caption | string? | A line under the figure. With SummaryCard.CaptionAggregate, | |
CaptionAggregate | QueryAggregate? | A second figure for SummaryCard.Caption, worked out over the same records with the first. The caption shows once it arrives. | |
CaptionColumnName | string? | The column SummaryCard.CaptionAggregate is worked out over. Unset, a count counts the records and any other figure is worked out over SummaryCard.ColumnName. | |
ChildContent | RenderFragment? | Anything under the figure. | |
ColumnName | string? | The column the figure is: the one SummaryCard.Aggregate is worked out over — | |
FetchXml | string? | The query whose records the figure is worked out over, in place of SummaryCard.ViewId. Its filters choose the records; its columns, sort and paging don't matter. | |
Format | string? | A .NET numeric format for a worked-out figure — | |
Href | string? | Makes the card a link to this address. | |
Icon | Icon? | The icon beside the figure. None by default. | |
Label* | string | What the figure is: 'Open pipeline', 'Win rate'. | |
OfFetchXml | string? | The query of the records the figure is a share of, in place of SummaryCard.OfViewId. | |
OfViewId | Guid? | The Dataverse view of the records the figure is a share of. Set, the card shows its figure divided by the same figure over these records, kept to the same related records. | |
Record | TableRecord? | The record the card belongs to, cascaded by the surrounding record context. | |
RelationshipName | string? | Keeps the records to those related to the cascading record through this relationship, as a SummaryCard.ViewId or SummaryCard.FetchXml, every related record counts. Until the record is saved there is no figure. | |
SelfReferencingRole | EntityRole? | Which side of a self-referencing many-to-many SummaryCard.RelationshipName the cascading record is on. Required for such a relationship, ignored for any other. | |
ShowProgressBar | bool | True | Shows a ratio as a bar too, under the percentage. Defaults to true. |
Value | string? | The figure, as it is shown. Set, it is shown in place of any other. | |
ViewId | Guid? | The Dataverse view whose records the figure is worked out over. |
AggregateModels.QueryAggregate on its own, not a combination. Unset, the card shows SummaryCard.ColumnName's value on the cascading record.CaptionSummaryCard.CaptionAggregate, CaptionAggregateSummaryCard.Caption, worked out over the same records with the first. The caption shows once it arrives.CaptionColumnNameSummaryCard.CaptionAggregate is worked out over. Unset, a count counts the records and any other figure is worked out over SummaryCard.ColumnName.ChildContentColumnNameSummaryCard.Aggregate is worked out over — FetchXmlSummaryCard.ViewId. Its filters choose the records; its columns, sort and paging don't matter.FormatHrefIconLabel*OfFetchXmlSummaryCard.OfViewId.OfViewIdRecordRelationshipNameSummaryCard.ViewId or SummaryCard.FetchXml, every related record counts. Until the record is saved there is no figure.SelfReferencingRoleSummaryCard.RelationshipName the cascading record is on. Required for such a relationship, ignored for any other.ShowProgressBartrue.ValueViewIdName | Type | Description |
|---|---|---|
OnClick | EventCallback<MouseEventArgs> | Makes the card a button, raised when it is clicked or pressed with Enter or Space. |
OnClickName | Type | Default | Description |
|---|---|---|---|
ChildContent | RenderFragment? | The cards. | |
MinCardWidth | string | 220px | The narrowest a card is drawn, as a CSS length: fewer fit on a row once they would be narrower. Defaults to |
ChildContentMinCardWidth