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

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.
5 REPLIES 5
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: Powered On

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.
DavJaq
Level: Powered On

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 ;^)