Hello Everyone,
Here's the problem (on a dropdown.items):
I need some help to understand what's going on in my app regarding a warning about nested tables and/or records. I have a dropdown that shows different options (collections) depending on the selected option of another dropdown. Here are the collections and the dropdown formulas:
at App.Onstart:
ClearCollect(
CNotUniquePeople,
Distinct(
'Demand Management'.'IT Architect',
'IT Architect'.DisplayName
),
Distinct(
'Demand Management'.'IT Project Manager',
'IT Project Manager'.DisplayName
),
Distinct(
'Demand Management'.'Team Leader Name',
'Team Leader Name'.Value
).Result
);
ClearCollect(
CPeople,
RenameColumns(Sort(Distinct(CNotUniquePeople, Result), Result), "Result", "Names")
);
Remove(CPeople, First(Filter(CPeople, Names = Blank() )));
ClearCollect(
CKBA,
Sort(Choices('Demand Management'.KBA), Value).Value
);
ClearCollect(
CInitiativeType,
Sort(Choices('Demand Management'.'Initiative Type'), Value)
);
ClearCollect(
CStatus,
Choices('Demand Management'.'Demand Status')
);
ClearCollect(
CRoadmap,
Sort(Choices('Demand Management'.Roadmap), Value)
);
Everything seems to be fine until here, now on the dropdown.items:
Switch(
varMyGallery,
2, CKBA,
3, CInitiativeType,
4, CPeople
5, CStatus,
6, CRoadmap,
["Loading"]
)
varMyGallery is changed accordingly with another dropdown, which is working fine. The problem seems to be with "CPeople" collection. The way it is above, a warning appears: "Warning: The columns produced by this rule are all nested tables and/or records, however the property expects at least some columns of simple values (such as text, or numbers).". If I comment line "4, CPeople", this warning disappears. But what's freaking me out is, if I leave the same line alone in another dropdown (or comment all the other lines) the warning also disappears.
CPeople alone, no error
And CPeople collection is just an "array" with names, as the other collections in the same dropdown
I would greatly appreciate if someone could help me to understand what's going on.
PS: I know I can use the collection CPeople on another dropdown as a workaround
Solved! Go to Solution.
So your issue is that you are mismatching signatures to the Items. If you do try to switch datasources to Items like that (which is risky to begin with), you at least need to match the columns and record signatures on all.
If you change your formula to this:
ClearCollect(
CPeople,
Filter(
RenameColumns(Sort(Distinct(CNotUniquePeople, Result), Result), "Result", "Value"),
!IsBlank(Value)
)
);
(NOTE: you can also get rid of the line to remove the blanks as this formula will do that for you.)
The above formula renames the column to "Value". All of your other collections are single column tables with a column named "Value".
You were trying to put in a collection with a single column table and a column named "Names". PowerApps does not consider them equivalent and will give you the error you were seeing.
I hope this is helpful for you.
So your issue is that you are mismatching signatures to the Items. If you do try to switch datasources to Items like that (which is risky to begin with), you at least need to match the columns and record signatures on all.
If you change your formula to this:
ClearCollect(
CPeople,
Filter(
RenameColumns(Sort(Distinct(CNotUniquePeople, Result), Result), "Result", "Value"),
!IsBlank(Value)
)
);
(NOTE: you can also get rid of the line to remove the blanks as this formula will do that for you.)
The above formula renames the column to "Value". All of your other collections are single column tables with a column named "Value".
You were trying to put in a collection with a single column table and a column named "Names". PowerApps does not consider them equivalent and will give you the error you were seeing.
I hope this is helpful for you.
Hmmmm i see, thank you very much!
User | Count |
---|---|
183 | |
124 | |
88 | |
45 | |
43 |
User | Count |
---|---|
254 | |
160 | |
126 | |
79 | |
73 |