web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Detect when list item is loaded in custom SharePoint list form

(0) ShareShare
ReportReport
Posted on by 1,594

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) ?

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at
    Re: Detect when list item is loaded in custom SharePoint list form

    Hi @R3dKap,

     

    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

  • R3dKap Profile Picture
    1,594 on at
    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 ?

  • MichelH Profile Picture
    400 on at
    Re: Detect when list item is loaded in custom SharePoint list form

    There really should be some signal or event that says the form is ready, the correct data is now loaded into the form.

     

    Now I need to have a timer wait before doing something, but I don't really know how long.

  • michelsmpit Profile Picture
    14 on at
    Re: Detect when list item is loaded in custom SharePoint list form

    I fully agree, this is the only missing link I have for creating an inline repeating section in my form. Since this repeating section works with a collection, I need a point to convert a field value to a collection (by splitting strings e.g.). I'm able so do this in an OnSelect of a button, but ideally I want this to happen automatically when the ListItem is loaded... That few milliseconds delay doesn't help 😉

  • R3dKap Profile Picture
    1,594 on at
    Re: Detect when list item is loaded in custom SharePoint list form

    I've put up the following workaround for now:

    • add the ID field on the form and hide it
    • set the visibility of the form to this:
    SharePointIntegration.SelectedListItemID = Value(DataCardValue5.Text)

    ...providing DataCardValue5 is the one for the ID field datacard...

  • michelsmpit Profile Picture
    14 on at
    Re: Detect when list item is loaded in custom SharePoint list form

    @R3dKap solution works great for hiding and showing things, but I need a trigger point to trigger a conversion from a string value to a collection, to get a repeating-section like behavior. 

    Capture.PNG

  • R3dKap Profile Picture
    1,594 on at
    Re: Detect when list item is loaded in custom SharePoint list form

    @michelsmpit you could put the formula I mentionned above ( SharePointIntegration.SelectedListItemID = Value(DataCardValue5.Text) ) into the Default property of a toggle control and then place your conversion formula inside the toggle's OnCheck property... What do you think?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 663 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 398 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard