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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Related Entity Fields ...
Power Apps
Answered

Related Entity Fields is emply (only in the app published, not in the app editor mode)

(1) ShareShare
ReportReport
Posted on by 76

Hello,

 

I'm blocked with a real basic scenario but I don't understand the behavior so I ask to you some help.

 

So, below the components used for this scenario:

- I've a combo box "ddBU" which display the Business Unit from my CDS (items = 'Business Units')

- There is a custom lookup of the entity "Business Units" to "User" (named "new_projectmanager")

- In my canvas app, when the Business Unit is choosen via the combo box, I want to retrieve the name of the User linked to this BU (and put it in a text label).

So, I have these formules

 

On the OnChange of the Combo Box:

 

 

UpdateContext({varSelectedBU: ddBU.Selected});

 

 

On the Text of the label:

 

 

varSelectedBU.'Project Manager'.'Full Name'

 

 

But, when I publish my app, the label stays empty....  I try to work with a collection of "Business Unit" but it complicates the app and it doesn't work anymore.... 

I also tried to add a Galery of User/Business Unit (and hide them) because I read some strange things about that but not result for this.

And as explained in the title, it fails only in the published app, not when I click on the "preview the app"

 

If someone has an idea, it's more than welcome 🙂

Thank you

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @R4isin 

     

    We can reproduce it even when the app is in preview mode too, not just play mode, if we use the root business unit as the selected record to test. 

     

    Try to see if using a new business unit record, and not the root business unit, is used. Because out of the box, a business unit must usually have a parent business unit, which also cannot be "itself". The root business unit does not have to have a parent, and the record still exists on the system despite the usual requirement to have a parent business unit, but the root business unit is the only exception. When you try to mess with the root business unit record itself, you may get this sort of problem, because that root business unit does not and usually cannot have a parent, so therefore it can not have a project manager in the custom field either. Because the required column "Parent Business Unit" can never be populated with any value, (presuming this being the root business unit and presuming no other business units existing on the system) -  neither can any other column be populated such as any custom columns like Project Manager or any other columns  - which means it also cannot be changed at all as a regular record. Try instead a new business unit record, where either the root business unit or some other business unit is the "parent" - and have the Project Manager set there as well. In that case we do not reproduce the issue. However, we can reproduce it on the root business unit.

     

    Check if above helps @R4isin  

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @R4isin wrote:

    But, when I publish my app, the label stays empty


    We can reproduce this too, even when we do not use the root business unit, and it is in the Play mode only just like you.

     

    We are not sure what is the cause at this time. Once we might know it, we might update the post. If someone else knows it, please feel free to reply.

     

     

     

     

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @R4isin 

     

    We have actually no solution within the specific constraints of the ComboBox values being inferred across the app in  play mode - but we do have a workaround where it works well on the Play mode. Treat the ComboBox item with the same sort of gymnastics as you would if it were a Dropdown Value and just force it through a LookUp. When we do this, it works. Example - in the Text property of your Label, use something like this:

     

    LookUp('Business Units',Name = First(YourComboBox.SelectedItems).Name).ProjectManager.'Full Name'

     

    Then it works. In this case we presume for this simple example, the first item of the ComboBox to be the one explicitly i.e. First(YourComboBox.Selecteditems). Notice that Selected form of YourComboBox is not present in official docs i.e. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-combo-box which means Selected may be an ambiguous or even deprecated property.

  • R4isin Profile Picture
    76 on at

    Hello,

    Ok, I've only this issue in the Play Mode because I use a filter on the combo box : 

     

    Sort(Filter('Business Units', !IsBlank('Parent Business')),Name,Ascending)

     

     

    I'm still curious about the technical reason which prevents to show directly this value (without use the "LookUp" word).

    In any case, thanks a lot for your reply and your time @poweractivate . Your workaround works so I can continue my work 😉

     

    Kr,

     

    Julien C.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard