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

Incorrect record lookup value displayed when using form->display with SharePoint

Here is my use case.  I have replicated using two (2) very basic SharePoint lists.

 

The main SharePoint list is called CRS_Test_List.  It consists of a title column and a column called "Company Name," which is a lookup to the title column of another SharePoint list called CRS_Test_Company_List.

 

I populated the CRS_Company_List list items with titles ranging from "Company A" to "Company Z."

 

I populated the CRS_Test_List list items with titles ranging from "Test 1" to "Test 26."

 

That is the extent of the data schema.

 

I have a browse screen with a gallery that displays the CRS_Test_List items, along with an icon which, when selected, navigates to a display screen(form->display) of the selected CRS_Test_List item.  On that same gallery, I have another icon which, when selected, navigates to an edit screen (form->edit) of the selected CRS_Test_List item.

 

In other words, from the browse CRS_Test_List screen, I can either choose to view, or edit any given list item.

 

Here's where I've encountered a problem.  If I initialize (start) the application, then select any given CRS_Test_List item to display (from the main screen "browse screen"), the "Company Name" field (which is a lookup to CRS_Test_Company_List) correctly matches the native SharePoint item.  However, if I return to the browse (main) screen and select a different item to display, the title (e.g. "Test 4") is correct, but the previous / initial item's Company Name lookup is populated instead of the correct one (the one you would see if you were using SharePoint natively to view the list item).

 

HOWEVER, if, instead of displaying the CRS_Test_List item I elect to EDIT it (form->edit), the "Company Name" column (which is a lookup to CRS_Test_Company_List) is correctly populated with the properly assigned lookup.

 

A assume this is a bug, as I am using virtually no additional code to populate the browse gallery, select an item, and navigate and display on the appropriate display or edit form.

 

Can the PowerApps team validate this and, either correct my misuse, or let me know when it will be addressed?

 

I've created a short app that replicates the problem if MS PowerApps support needs to validate.

 

Many thanks.  I've created some very comprehensive PowerApps apps at my company and would like to continue creating more, but I really need to understand the cause and resolution of this anomaly.

 

Best regards,

 

Kevin

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @kjones ,

Do you mean that the LookUp type column value  of your SP list could not display correctly within your Display form?

I have made a test on my side, and don't have the issue that you mentioned. Please check the attached GIF screenshot for more details:

 

Please take a try with the following workaround:

Set the OnSelect property of the Gallery within your app to following:

Set(CurrentSelected, ThisItem)

Set the OnSelect property of the "View" icon within your Gallery to following:

Select(Parent);  /* <-- Add this formula */
Naviagte(DisplayScreen, ScreenTransition.Fade)

Set the OnSelect property of the "Edit" icon within your Gallery to following:

Select(Parent);    /* <-- Add this formula */
EditForm(EditForm1);
Navigate(EditScreen1, ScreenTransition.None)

 

Within your Display screen, set the Item property of the Display form to following:

CurrentSelected

Within your Edit screen, set the Item property of the Edit form to following:

CurrentSelected

If the issue still exists, please consider take a try to re-create a new app based on your SP list, then take a try with above solution I provided, check if the issue is solved.

Also please take a try to turn off/disable the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, re-publish your app, check if the issue still exists.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @kjones ,

Do you mean that the LookUp type column value  of your SP list could not display correctly within your Display form?

I have made a test on my side, and don't have the issue that you mentioned. Please check the attached GIF screenshot for more details:

 

Please take a try with the following workaround:

Set the OnSelect property of the Gallery within your app to following:

Set(CurrentSelected, ThisItem)

Set the OnSelect property of the "View" icon within your Gallery to following:

Select(Parent);  /* <-- Add this formula */
Naviagte(DisplayScreen, ScreenTransition.Fade)

Set the OnSelect property of the "Edit" icon within your Gallery to following:

Select(Parent);    /* <-- Add this formula */
EditForm(EditForm1);
Navigate(EditScreen1, ScreenTransition.None)

 

Within your Display screen, set the Item property of the Display form to following:

CurrentSelected

Within your Edit screen, set the Item property of the Edit form to following:

CurrentSelected

If the issue still exists, please consider take a try to re-create a new app based on your SP list, then take a try with above solution I provided, check if the issue is solved.

Also please take a try to turn off/disable the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, re-publish your app, check if the issue still exists.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

That appears to have resolved my problem.  Many thanks.  If I run into this situation again, I'll look to recreate and send you the package.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (73,046)