cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Lookup Column in Edit Form assigns data correctly, but does not display updated data

Hi, There are 2 entities involved:

 

Item:

  • Product Category (Lookup column)

 

Product Category:

  • Name (Primary name column)

 

I've excluded the multitude of other columns which I believe to be irrelevant.

 

The Product Category datacard is in an Edit Form for the Item entity. I can select the Product Category and submit the form, and looking at the Item Data Table shows that the Product Category column correctly assigns the selected Product Category.

AndrewsVC_0-1611257480531.png

 

However, after the form has been submitted, I navigate away from the screen and back again. If I select the Item again to view it in its form, the dropdown input is blank, which does not match the data.

 

AndrewsVC_1-1611257588721.png

 

The dropdown input's default is set to "Parent.Default" - the parent Data Card's default is "ThisItem.'Product Category'", which seems to be correct. What can I be missing?

AndrewsVC_2-1611257694328.png

 

Thanks in advance, help is much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Regular Visitor

Update: The issue appears to be how I had implemented the Gallery used to select the parent items.

AndrewsVC_0-1611513147294.png

Previously, I set the selectedPO variable when navigating to this screen, and thus Power Apps created a Collection with selectedPO.Items in my Gallery.

 

I changed my approach, adding an invisible field to the Item form that assigned the Parent PO in a Lookup column, and instead filtered across ALL Items by this Lookup column. Since this new Filter doesn't utilise a Collection, it also updated instantly instead of having to refresh the page (another issue I was having).

 

I suspect that the issue could be that items selected from a Collection don't quite propagate Lookup column information correctly, though someone else with more experience would have to corroborate my hypothesis.

View solution in original post

5 REPLIES 5
Super User II
Super User II

Hi @AndrewsVC 

I suspect the control is a combobox.  If it is,, Parent.Default will need to be in the  DefaultSelectedItems property.  

Hi @Drrickryp,

 

Both the Default and DefaultSelectedItems properties are set to Parent.Default. I also experimented with setting Default to blank and leaving DefaultSelectedItems as Parent.Default but it didn't seem to make a difference.

 

AndrewsVC_0-1611409732447.png

 

@AndrewsVC 

To troubleshoot the problem, remove the field from the field list and then select it again. See if it still won’t work right.

Regular Visitor

@Drrickryp 
It seems that even with the default locked parameters, the field does not quite work right.

AndrewsVC_0-1611503355534.png

 

Another solution I'm thinking of is to strip out the relationship and instead set the category as a text column, only using the category names as a reference instead of directly relating to the entities, though I feel that could give up on useful features.

 

Regular Visitor

Update: The issue appears to be how I had implemented the Gallery used to select the parent items.

AndrewsVC_0-1611513147294.png

Previously, I set the selectedPO variable when navigating to this screen, and thus Power Apps created a Collection with selectedPO.Items in my Gallery.

 

I changed my approach, adding an invisible field to the Item form that assigned the Parent PO in a Lookup column, and instead filtered across ALL Items by this Lookup column. Since this new Filter doesn't utilise a Collection, it also updated instantly instead of having to refresh the page (another issue I was having).

 

I suspect that the issue could be that items selected from a Collection don't quite propagate Lookup column information correctly, though someone else with more experience would have to corroborate my hypothesis.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (26,703)