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

SPO Lookup column binding lost on EditForm!

 

This is a "tale of two galleries" on one form. They manage two parent/child SharePoint online lists. The lists are joined by a lookup. I patch the children into being (with a "people" button on gallery1) and clone along a plain text field for the ride in the child record so that delegation works on my filters.) Now,  this app is sweet and fast, however there is one more issue... When the app is freshly launched, and you want to edit the parent list bound item (with the wrench button), although the gallery selection currency is passed explicitly to the edit form item, only the text fields show up on the edit form! The other complex (lookup) fields are blank, but only until you visit another parent record!  Now, I have placed targeted refreshes on a variety of buttons to no avail. After you tickle 2 different parent records, the complex fields suddenly bind in the Edit forms and all is well for the rest of the app session! If you bounce back from the gallery to the same parent record, the complex fields never populate in the parent Edit form! In synopsis, Two galleries,  two edit forms, patched children are fine(edited with the person button from gallery2), but the parent lookups are not bound until you touch two unique list items. Why did I do it this way, because of a 1:M relationship I need to support in Power Apps with an SPO backend.(As for PowerApps, It's still the best of times, it's still the worst of times! )  Thanks for any insights.

 

file.pngTwo galleries against SPO lists

file1.pngComplex columns are ok

file2.pngComplex cols are missing!

2 REPLIES 2
Community Support Team
Community Support Team

Re: SPO Lookup column binding lost on EditForm!

Hi SmartMeter,

 

When you are navigated from the Gallery the Edit form which is based on Parent list, there is no value for the Lookup field? When you click the dropdown button, will the value appear? Likes the following screenshot.


Do you have set any code on the Lookup field?

 

3.PNG


I would like to know more about the Parent and Child lists, how are the two lists configured? Do you have Lookup column in both the two lists?

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SmartMeter
Level 8

Re: SPO Lookup column binding lost on EditForm!

 

Hi Mabel, and thank you for helping me! Using the Asset lookup as our example, I can click the dropdown button and values appear to select from, just as in the image you posted(so they are not broken as lookups), it is just that they are empty when the edit form presents. Remember this record was previously stored on the parent list. (In other words, the Thisitem context is empty when the edit form pops)

Asset2.jpg

These data cards were locked, and to do a sanity check, I deleted and then added them back with no difference in the issue. I have subsequently dug into this, and unlocked the cards to manually set the default to "Thisitem.Asset" (in this case you can see it in image below) which did nothing for me! I was hoping that this would be a way to force it to realize that I wanted the datacard hard bound to the column (which it is, except for the first launch of the app, again it all works fine except for the first record that you touch has "empty fields".

AssetCode.jpg

Your last question was to know a little bit more about the list objects. Our example, the asset field, is a lookup against an SPO list object named Asset. It works just fine, again, when you set focus or tickle another record, but the first session it shows previously stored data as empty. When you click the dropdown, all the good data is waiting to select, so the issue is isolated to the popping and initial filling of the values for edit form presentation. As another sanity check, I can use the SharePoint list settings editor to view the list records, and they all have data in them, while the app shows empty fields, until I set focus on at least one other record. One more thought for you, I wrote this app against on-prem SharePoint lists first, and now I have changed the backend over to SPO lists. Only the cloud version of SP is doing this to me.

Thanks again for the help, the list details for the asset lookup objects are shown below.

 

asset3.jpg

Asset4.jpg

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,216)