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

SharePoint list using customized form Edit screen and View screen opening with wrong attachments

I created a custom form with three screens (New, Edit, View) for a list and the Edit and View screens are defaulting to the data from the SharePoint list's first list item (as explained here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/sharepoint-form-integration  with Item property: 

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First('YourListName'),SharePointIntegration.Selected)

 

This leads to an issue where I noticed that sometimes when I go to the list to view or edit a list item, the list item launches with the attachments from the first list item of the list (same one that opens by default in the powerapps studio).

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

Hi @DavJaq,

Have you solved your problem?

Please consider take a try to modify your formula within the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');
Set(SharePointFormMode, "ShowForm");
ViewForm(ViewForm);
Navigate(ViewFormScreen, ScreenTransition.None)

then check if the issue is solved.

If the issue still exists, please consider take a try to delete the custom form from your SP list, and then create a new one for it, check if the issue still exists.

More details about deleting custom form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form#delete-the-custom-f...

 

Best regards,

Kris

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

7 REPLIES 7
Community Support Team
Community Support Team

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

Hi @DavJaq,

Could you please share a bit more about your issue?

I have made a test on my side, and don't have the issue that you mentioned.

Please check if you have navigated to proper screens when you edit or view a list item within your app.

In addition, please consider take a try to modify the formula within the OnView property and OnEdit property of the SharePointIntegration control:

Set the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');       /* <-- Add formula here */
ViewForm(SharePointForm1)

Set the OnEdit proeprty of the  harePointIntegration control to following:

Refresh('YourSPList');   /* <-- Add formula here */
EditForm(SharePointForm1)

If the issue still exists, please also consider take a try to create separated screens for creating, editing and viewing based on the following blog:

https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

 

Best regards,

Kris

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.
DavJaq
Level 8

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

Hi @v-xida-msft,

 

I already have three screens (NewFormScreen, ViewFormScreen, EditFormScreen) and each with a form (NewForm, ViewForm, and EditForm). The OnView  property of the SharePointIntegration  control set to the following:

Set(SharePointFormMode, "ShowForm");ViewForm(ViewForm);Navigate(ViewFormScreen, ScreenTransition.None)
Community Support Team
Community Support Team

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

Hi @DavJaq,

Have you solved your problem?

Please consider take a try to modify your formula within the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');
Set(SharePointFormMode, "ShowForm");
ViewForm(ViewForm);
Navigate(ViewFormScreen, ScreenTransition.None)

then check if the issue is solved.

If the issue still exists, please consider take a try to delete the custom form from your SP list, and then create a new one for it, check if the issue still exists.

More details about deleting custom form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form#delete-the-custom-f...

 

Best regards,

Kris

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

DavJaq
Level 8

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

@v-xida-msft,

I will add

Refresh('YourSPList');

 to the beginning of the formula on the OnView and OnEdit properties of SharePoint Integration and monitor to see if the issue reoccurs.

 

Thanks

DunstonJ
Level: Powered On

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

You have no idea how much time I have spent working on a similar problem.  I put a Notify message in the SharePointIntegration - OnView with SharePointIntegration.Selected.ID in the code.  The first time I opened the form the Notification showed a blank value, each subsequant time I opened the document, the Notification displayed the ID for the previously opened document along with some of the values from the previous document.  Placing Refresh('YourSPList") at the first of the code in OnEdit & OnView fixed this issue!!

 

Thank You, I can stop banging my head on my desk . . . . atleast until the next issue that eludes me ;^)

Ullas
Level: Power Up

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

HI @v-xida-msft 

i have same issue, i tried your sugestion it didn't not fix the issue., i am still stuck with this.

And in my case every time it loads the same wrong data, Data in view and edit form don't change, no matter which item is selected form list.

Runner55552
Level: Powered On

Re: SharePoint list using customized form Edit screen and View screen opening with wrong attachments

Same issue here.  No matter what item the user selects from the list, when the form opens, and navigates to the edit screen, the cards/fields are pulling in the "First" list item, not the current item. I tried your solution but that did not have an effect.

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
Users Online
Currently online: 372 members 5,526 guests
Please welcome our newest community members: