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!!

3 REPLIES 3
v-siky-msft
Level 8

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!!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 232 members 5,015 guests
Recent signins:
Please welcome our newest community members: