cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
egallis
Level 10

Detect when list item is loaded in custom SharePoint list form

I customized a SharePoint list item with Powerapps.

 

Once published, I noticed that when you double-click on a list item, the item data don't show up immediately in the form fields but only after a few seconds or miliseconds (which means that if you jump from one list item to another, you see the previous item data for a few seconds -> not very nice).

 

Anyone knows a way to detect when the data for the selected item has indeed been loaded ?

 

Is there a way to clear all fields in the form every time the form is shown (so it looks empty while it loads the item's data) ?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Detect when list item is loaded in custom SharePoint list form

Hi @egallis,

 

The SharePoint List form is using a way to determine whether the data has been loaded by the method below (Under the Item property of the Form control):

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First(List1),SharePointIntegration.Selected)

The default loading experiences from my side for the View Form is as below:

SPFormLoading.gif

 

 

And as the Formmode is Formmode.New, the SubmitForm and ReSetForm would have no effects.

So there is no way based on what I know, to clear those fields before loading for another item.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
egallis
Level 10

Re: Detect when list item is loaded in custom SharePoint list form

Hi @v-micsh-msft,

 

As you can see on your GIF, there is a small latency on the form before the values of the preivous edited item are replaced by the ones ffrom the selected item.

 

When the OnEdit event of the SharePointIntegration object or the OnVisible event of the screen are triggered they hold the values of the previous item, not the real selected one (at least for a few milliseconds).

 

Is there any wa around this ?

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: 319 members 6,297 guests
Please welcome our newest community members: