cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
navneet_singh
Frequent Visitor

Support for Multiple Data Types

Can I add elements of different data types in a sing;e type group in ControlManifest.xml?  @HemantG 

<type-group name = "MultipleTypes">
      <type>SingleLine.Text</type>
      <type>SingleLine.URL</type>
      <type>SingleLine.TextArea</type>
      <type>Multiple</type>
<type> Whole.None </type>
<type> Float </type>
    </type-group>
4 REPLIES 4
ben-thompson
Solution Sage
Solution Sage

I suspect you would be better off with multiple controls as you can only bind to one type at a time see https://docs.microsoft.com/en-us/powerapps/developer/component-framework/manifest-schema-reference/p... 

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
a33ik
MVP

Hello,

This definitely works. I used it in one of my controls - https://github.com/AndrewButenko/CompositeAddress_PCF/blob/master/CompositeAddress/ControlManifest.I...

Here is an example:

    <type-group name="StringOrOptionset">
      <type>SingleLine.Text</type>
      <type>OptionSet</type>
    </type-group>
    <property name="state" display-name-key="State/Province" description-key="State/Province" of-type-group="StringOrOptionset" usage="bound" required="false" />

 

But which field type is bound to input you will have to analyze during runtime of the control.

Trust me to follow the out of date documentation. 

 

Looking at my link it's a typo in list of types. Float is not an option it should be FP.

 

 

<type-group name = "MultipleTypes">
      <type>SingleLine.Text</type>
      <type>SingleLine.URL</type>
      <type>SingleLine.TextArea</type>
      <type>Multiple</type>
      <type>Whole.None</type>
      <type>FP</type>
</type-group>

 

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".
v-xida-msft
Community Support
Community Support

HI @navneet_singh ,

Could you please share a bit more about your scenario?

Do you want to specify different data type within the <type-group> node, e.g. Whole.None and SingleLine.Text in same type group?

 

If you want to specify different data type within the <type-group> node, e.g. Whole.None and SingleLine.Text in same type group, I afraid that there would have some issue with it.

 

When you specified Whole.None and SingleLine.Text in same type group, they would not be considered as compatible types. The types considered compatible as below:

1. Strings: SingleLine.Text, Multiple, SingleLine.TextArea, SingleLine.Email, SingleLine.Phone, SingleLine.URL, SingleLine.Ticker.
2. Numbers: Decimal, Floating Point, Whole.None, Currency.
3. Dates: DateAndTime.DateAndTime, DateAndTime.DateOnly.

Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/manifest-schema-reference/t...

 

If the types listed in the group are not considered compatible, then the parameter will be treated as the first type listed in the type-group.

Note: If you specified different data type within the <type-group> node, e.g. Whole.None and SingleLine.Text in same type group, there is no error with this configuration, but only the first type listed within this type group could be applied to current parameter.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Users online (17,631)