Hi,
When you use the ClearCollect (or Collect) functions to create a collection, in all records of the collection, properties with the same name must be of same data type.
In other words, the following code...
ClearCollect(
{
name: "Height",
value: 300
},
{
name: "Text",
value: "Default text"
}
)...leads to an error because the value property cannot be an integer in one record and a string in another one.
I created a collection regrouping all controls enums in PowerApps:
ClearCollect(
gloControlEnums,
{
name: "Font",
values: Table(
{
name: "Arial",
value: Font.Arial
},
{
name: "Courier New",
value: Font.'Courier New'
},
{
name: "Dancing Script",
value: Font.'Dancing Script'
},
{
name: "Georgia",
value: Font.Georgia
},
{
name: "Great Vibes",
value: Font.'Great Vibes'
},
{
name: "Lato",
value: Font.Lato
},
{
name: "Lato Black",
value: Font.'Lato Black'
},
{
name: "Lato Hairline",
value: Font.'Lato Hairline'
},
{
name: "Lato Light",
value: Font.'Lato Light'
},
{
name: "Open Sans",
value: Font.'Open Sans'
},
{
name: "Open Sans Condensed",
value: Font.'Open Sans Condensed'
},
{
name: "Patrick Hand",
value: Font.'Patrick Hand'
},
{
name: "Segoe UI",
value: Font.'Segoe UI'
},
{
name: "Verdana",
value: Font.Verdana
}
)
},
{
name: "FontWeight",
values: Table(
{
name: "Bold",
value: FontWeight.Bold
},
{
name: "Semibold",
value: FontWeight.Semibold
},
{
name: "Normal",
value: FontWeight.Normal
},
{
name: "Lighter",
value: FontWeight.Lighter
}
)
},
{
name: "BorderStyle",
values: Table(
{
name: "None",
value: BorderStyle.None
},
{
name: "Dashed",
value: BorderStyle.Dashed
},
{
name: "Dotted",
value: BorderStyle.Dotted
},
{
name: "Solid",
value: BorderStyle.Solid
}
)
},
etc...What is really strange is that among the 21 enums in PowerApps, two of them won't fit into the collection above:
- Zoom (in the PDF Viewer control)
- FormMode (in the Edit Form control)
I assume this is due to the fact that, for some strange reason, the data type of these 2 enums differ from all 19 others. PowerApps shows this error when adding one of these 2 enums to my collection above:

Anyone from the PowerApps team can help me on this ?
Thanks,
Emmanuel