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 / Multiple levels on man...
Power Apps
Answered

Multiple levels on many to one - Error but displaying the right values

(0) ShareShare
ReportReport
Posted on by 518 Moderator

Hello,

i have a gallery in a custom page, where i want to display values that are two levels higher.

from the starting point these are all one-to-many relationships, so the way up the levels is unique.

 

In the dropdown box the values are also displayed in the right way, but it still gives an error message

SLMR_0-1701274171430.png

Here in this screen the value for customer is always the same, but if i look at the whole data, it always displays the right value.

So i do not know why it gives an error, if everything works as it should.

Any idea?

Categories:
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @SLMR , 

     

    I have covered this topic in this post: https://thepoweraddict.com/how-to-work-with-many-to-one-dataverse-relationships/

     

    Let me know if this helps. 

     

    Thanks,

    Hardit Bhatia

    Microsoft MVP

  • SLMR Profile Picture
    518 Moderator on at

    Hello,

    thanks for the quick reply. 

    It is a helpfull article.

    Anyway i knew that the error will disapear when using Lookup to get the record first.

     

    Do you know why using only dots gives the same result, if the error is ignored?

    (I just whant to understand the underplying principle. I would understand it if accessing information over multiple levels would not work with the use dots alone, but it works. It only shows an error)

  • SLMR Profile Picture
    518 Moderator on at

    Hello @PowerAddict ,

    it is no prolem to go 2 levels up.

    LookUp(Cases,Case=ThisItem.Case.Case).Projekt

    for the default selected item of the dropdown box.

    Now i want to go up a next level.

    This should be:

    LookUp(Projekts,Projekt=LookUp(Cases,Case=ThisItem.Case.Case).Projekt).Kunde

     

    But it tells me the Looukp has invalid arguments. It does not know the attribute Case not even if i user cr8ec_caseid.

    The lookup is excatly the same as it is in the other dropdown box. So how can it be wrong now?

     

  • SLMR Profile Picture
    518 Moderator on at

    @PowerAddict 

    I found a work-around by introducing two text boxes

    txt_casenr

    value: txt_Case.Selected.Case

     

    txt_projektnummer

    value LookUp(Cases,cr8ec_caseid=GUID(txt_Casenr.Value)).Projekt.Projekt

     

    and then set the default selected item of the dropdown to

    LookUp(Projekts,Projekt=GUID(txt_projektnummer.Value)).Kunde

     

    But their must be an easier way?

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @SLMR 

    Try this: 

    With(
     {
     varCase: LookUp(
     Cases,
     Case = ThisItem.Case.Case
     )
     },
     LookUp(
     Projekts,
     Projekt = varCase.Projekt
     )
    ).Kunde

    You could also take the column inside the Lookup so it becomes more performant: 

     

    With(
     {
     varCase: LookUp(
     Cases,
     Case = ThisItem.Case.Case
     )
     },
     LookUp(
     Projekts,
     Projekt = varCase.Projekt,
     Kunde
     )
    )

    Let me know if this works. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

  • SLMR Profile Picture
    518 Moderator on at

    Good morning,

    thank you for your welcome help.

    Anyway this does not work either:

    Problem arise in the second lookup:

    First i have to correct:

    Projekt=var.Projekt to 

    Projekt=var.Projekt.Projekt 

    as left side is GUID and right side was Record.

    But than it gives an error retriving data from the network stating cr8ec_Projekt is unknown.

     

    This is something i do not understand in PowerApps logic expressions that do not have an real error do not work as they should.

    But what is even worst, sometimes the work the day you implement them, and on the next day they do not work anymore.

     

    Do you know if there is any good book (paper) that describes the Fitlering and Lookup Funtions in a detailed way, especialy if using multpile levels, which is my normal use case? 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    What I shared was an approach, not necessarily the exact code that will work for you. If you want the exact code, may be you can share some more details and I can help. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard