web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Empty fields in powera...
Power Apps
Unanswered

Empty fields in powerapps collection when datasource is CDS.

(0) ShareShare
ReportReport
Posted on by 104

I've been unable to find a working workaround for this apparent bug.

 

I'm simply trying to create a collection from CDS entity that contains relationships. I want to be able to access the related entities via my collection.

 

ClearCollect( MyCollection, 'My CDS Entity')

Without fail, all the lookup values in MyCollection are blank.

 

I have seen some posts suggesting to use ShowColumns and AddColumns to explicity call down the related fields. This has not worked for me:

 

ClearCollect(
    LoadedScoreCard,
    ShowColumns(
        AddColumns(
            ThisItem.'Customer Rating Informations',
            "New Risk Group", 'Risk Group'.Name, // Lookup
            "New Measure ID", Measure.Name, // Lookup
            "New Measure Text", 'Measure (text)',
            "New Score", Score,
            "New Measure Option Selected", 'Measure Option Selected (text)',
            "New Measure Option", 'Measure Option Selected'.'Measure Option' // Lookup
        ),
        "New Risk Group",
        "New Measure ID",
        "New Measure Text",
        "New Score",
        "New Measure Option Selected",
        "New Measure Option",
        "Customer RI"
    )
);

 

What is the situation here? Have I missed something or is this an outstanding bug?

 

Thanks

JT

I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    It looks like you are making things more complicated than they need to be.  Are you familiar with how PowerApps handles relationships and visualize them in Galleries and Datatables?  While you may want to create collections, it will complicate things by an order of magnitude.  First see if you really need to do that.  Check out this post to see if you can accomplish what you want by following the logic. https://powerapps.microsoft.com/en-us/blog/one-to-many-relationships-for-canvas-apps/ .  I would also suggest that you play with the Northwind database example that you can download here.  It really helped me understand how relationships are managed in PowerApps.  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/northwind-install 

    Hi @JT_Corrin 

  • JT_Corrin Profile Picture
    104 on at

    Hi @Drrickryp 

     

    Thanks for taking some time to respond.

     

    Your answer nor the article really relate to my issue. Specifically,  when collecting a datasource/entity into a collection, the resulting collection omits the lookup values contained within the datasource/entity. They are simply blank.

     

     I've done more reading around on this and it seems it been an issue for a while. This post helped:

     

    https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Help-with-LookUp-Columns-CDS-Entities-returning-null-data-for/td-p/181647

     

    Ultimately, I have had to add an invisible gallery with an "items" value of my collection and labels that reference each of my lookup values to "trick" PowerApps into bringing those values down into the app.

     

    If this is by design then I can only assume that the designers had spent the night before huffing glue - absolutely bat **bleep** crazy.

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @JT_Corrin 

    Wow, I had no idea. Thanks for the reference. This needs to be fixed.

  • JT_Corrin Profile Picture
    104 on at

    Just wanted to update that my workaround of creating a gallery that references the missing lookup items (in order to force PowerApps to bring that data down from CDS), is not consistent as a solution.

     

    Still looking for an acceptable solution before I will go to support.

  • Charbel_kh Profile Picture
    50 on at

    Hi JT_Corrin,
    I've been facing the same problem.
    Were you able to find a solution to that?

  • lex02 Profile Picture
    4 on at

    Four years later, I'm facing the exact same issue. 

    Does anyone know if this is a bug?

  • JT_Corrin Profile Picture
    104 on at

    Hi lex02,

     

    Yeah this issue is a pain. Its been a while since I looked at it but I seem to remember reminding myself that I should always use the "ShowColumns" function to get around this issue:

    AddColumns, DropColumns, RenameColumns, and ShowColumns functions - Power Platform | Microsoft Learn

    It works for me

  • JT_Corrin Profile Picture
    104 on at

    Although reading my original post it seems showcolumns did not work for me back in 2020 - i think it has worked for me in the following years

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard