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

Warning about nested tables and/or records

Hello Everyone,

 

Here's the problem (on a dropdown.items):

calcag_1-1599216437838.png2020-09-04 07_49_01-NDM App - Power Apps.png

 
 
 
 

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.

 

calcag_1-1599216437838.png2020-09-04 07_49_01-NDM App - Power Apps.pngCPeople alone, no errorCPeople alone, no error

 

And CPeople collection is just an "array" with names, as the other collections in the same dropdown

 

2020-09-04 07_54_56-Zoomit Zoom Window.png

 

 

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


 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@calcag 

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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

@calcag 

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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

Hmmmm i see, thank you very much!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,417)