cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
aorphan
Level 8

ViewForm Lookup Fields not showing values when Form's Item property is a variable or LookUp()

Hello,

This bug should be very easy for your team to reproduce. When I click on an item in my gallery, I want to set a variable (gblMyItem = ThisItem), navigate to a new screen and display a form in View mode. However, the lookup field values are always blank. It will work when the form's Item property is set to Gallery.Selected, but I cannot use Gallery.Selected because I need other functionality on these screens which will only work with a variable. I have tried with the Form's Item property as both a variable or a LookUp() function call, and neither seems to work consistently. Note sometimes in the PowerApps editor, you will force the lookup fields to load and then it will appear to work, but if you publish the app and play it, you will notice that the lookup fields won't load.

Any advice? Lookups are a huge pain, this is just another chapter of the same story.

EDIT: I am using CDS as my data source.

1 ACCEPTED SOLUTION

Accepted Solutions
aorphan
Level 8

Re: ViewForm Lookup Fields not showing values when Form's Item property is a variable or LookUp()

Hi @Oscar_Sanchez ,

Yes, I know what you are talking about. However, it does not work when the form is in View mode, i.e. when I do ViewForm(myForm) (not EditForm(myForm)). The lookup form fields are still unfortunately blank.

EDIT: Thanks for the suggestion! I was able to work around the issue by doing something similar. On the same screen as my form, I created a new Group control and set the Visible property to false. I added the same lookups as labels to the group with the Text property set like so: 

gblMyVariable.LookUpEntity.Field

and it forces the lookup form fields to load. Thanks!!

View solution in original post

3 REPLIES 3
Microsoft v-siky-msft
Microsoft

Re: ViewForm Lookup Fields not showing values when Form's Item property is a variable or LookUp()

Hi @aorphan ,

 

I also have this issue when working with Accounts entity after my test.  “Create by” field can’t load. However my custom entity work well, it is really confused.

I would post this issue to my product team. If this issue is solved, I would reply here.

Annotation 2019-09-05 175944.png

 

Best regards,

Sik

Oscar_Sanchez
Level: Powered On

Re: ViewForm Lookup Fields not showing values when Form's Item property is a variable or LookUp()

Hi!!! @aorphan  

You have to tried with this.

First of all you need to enter to your gallery and you should insert a label, in the property text you will put

ThisItem.(Entity).(Field that you want show)

Later you can hide this label, this control helps you showing the values in the fields of the forms .

 

I think this is a bug of Microsoft but now this is the best way to fix it.

Best regards

OASG

aorphan
Level 8

Re: ViewForm Lookup Fields not showing values when Form's Item property is a variable or LookUp()

Hi @Oscar_Sanchez ,

Yes, I know what you are talking about. However, it does not work when the form is in View mode, i.e. when I do ViewForm(myForm) (not EditForm(myForm)). The lookup form fields are still unfortunately blank.

EDIT: Thanks for the suggestion! I was able to work around the issue by doing something similar. On the same screen as my form, I created a new Group control and set the Visible property to false. I added the same lookups as labels to the group with the Text property set like so: 

gblMyVariable.LookUpEntity.Field

and it forces the lookup form fields to load. Thanks!!

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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