編輯

共用方式為


type-group element

The type-group node defines a set of types identified by a single name. This information can be used to identify the data types supported by a specific property.

Available for

Model-driven and canvas apps

Parameters

Name Description Type Required
name Name of the data type string Yes

Parent Elements

Element Description
control Defines the component's namespace, version and display information.

Child Elements

Element Description Occurrences
type The type in the type-group node defines the data type. 1 or more

The type-group has a limited support for canvas apps. When the type groups can easily resolve to a common type, the "most compatible" type (generally the least specific type) is chosen for the type of the given column. The resolvable type groupings are as follows:

  • Strings: SingleLine.Text, Multiple, SingleLine.TextArea, SingleLine.Email, SingleLine.Phone, SingleLine.URL, SingleLine.Ticker.
  • Numbers: Decimal, FP, Whole.None, Currency.
  • Dates: DateAndTime.DateAndTime, DateAndTime.DateOnly.

For example, the following type group results in the component receiving the value Decimal as the type for the given parameter's type:

<type-group name="numeric">
       <type>FP</type>
       <type>Decimal</type>
       <type>Whole.None</type>
</type-group>

When a type-group includes a value that is not included in any of the above groups, or includes values from more than one group, the first value listed in the type-group is chosen as the type for that parameter.

For example, the following type group results in the component receiving the value TwoOptions for the given parameter's type:

<type-group name="example1">
       <type>TwoOptions</type>
       <type>Decimal</type>
       <type>FP</type>
</type-group>

While the following would again receive "Decimal":

<type-group name="example2">
       <type>Decimal</type>
       <type>TwoOptions</type>
       <type>FP</type>
</type-group>

Example

<type-group name="numbers">
      <type>Whole.None</type>
      <type>Currency</type>
      <type>FP</type>
      <type>Decimal</type>
    </type-group>

Power Apps component framework manifest schema reference
Power Apps component framework API reference
Power Apps component framework overview