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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Customized S...
Power Apps
Answered

PowerApps Customized SharePoint List Forms - OnStart and ResetForm() function issue

(0) ShareShare
ReportReport
Posted on by 5

Regarding: SharePoint PowerApps Customized Forms

PowerApps has a Screen / OnStart event that may be used to populate collections or set variables on load.

I’ve recently discovered an issue, where the OnStart event is triggered only once on the first item a user edits in a SharePoint list. If a user opens a second item OnStart does not trigger.

Behavior:
1. User edits existing form – OnStart is triggered
2. User saves or cancels form
3. User opens new form - OnStart does not trigger – global variables are set to values from previous load
4. User saves or cancels form
5. User opens second existing item – OnStart does not trigger

To recreate the issue spin up a simple list with a few columns, create a PowerApps Customized form for the SharePoint List.

1. Go to OnStart under “…Screen” for the form and create a global variable and set it to Now(): Set(myStartTime , Now())
2. Create a label on the form and set the text property to the start time variable myStartTime
3. Save/Publish

Test:
1. Open the first item or create a new item: Note the date and time
2. Close or Save form
3. Open a second item, the label will have the previous data and time from the last item opened.

2nd Issue:
PowerApps has a ResetForm() function that is called when a PowerApps form is saved or canceled. It initializes controls on the form to default or (current) values of the underlying listitem.
There is an issue with dropdown controls and radio buttons populated from collections. These types of controls will not reset properly and sometimes will display values from the previous item edited.

 

Has anyone encountered these issues?   

Categories:
I have the same question (0)
  • Verified answer
    Eickhel Profile Picture
    374 Most Valuable Professional on at

    From my experience, the OnStart runs only once for Sharepoint List Form PowerApps. If you select another item it does not run. You could use the OnVisible property to change variables once the PowerApp is visible again ( i.e: when you change the selected item in a list ).

     

    For the second issue, I've learned from @mr-dang that, for dropdowns, you need to set a variable for the Reset property that will trigger the actual reset of the control. I have these lines of code in the OnNew property of the SharepointIntegration control:

     

     

    Set(ResetControls, true);
    Set(ResetControls, false);

    And then, in each dropdown reset property I have the ResetControls variable. Those two lines trigger the reset.

     

    Check and let me know.

     

  • JBL Profile Picture
    5 on at

    That worked, thank you. Turning the value for Reset from false to true will execute the reset of the controls.

     

    Unfortunately, OnVisible only works on first load, the same as OnStart. 

  • Eickhel Profile Picture
    374 Most Valuable Professional on at

    Ok, could you please let me know what are you trying to do in the OnVisible?

  • PauloRech Profile Picture
    105 on at

    Hi all. I'm new in PowerApp, but senior developer. 

    I'm facing the same issue described below, about the OnStart and OnVisible event issue.

     

    Is there a solution to this case?

     

    Thanks. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @PauloRech @JBL @Eickhel  Did anyone find a solution to the OnStart or OnVisible only running once when opened from a sharepoint list?

  • WarrenBelz Profile Picture
    155,313 Most Valuable Professional on at

    @Anonymous & @PauloRech ,

    This is an old closed thread, please post new queries so someone will see and respond to them.

  • PaulClifford-Jo Profile Picture
    6 on at

    Hi PauloRech,

     

    Does anyone else feel that the custom form object for SPO seems to have been squeezed into the "canvas app" designer and isn't a great fit? This thread points at an example of this whereby events that you might expect to leverage for setting variable values and running conditional tests are not reliable. OnStart runs, I guess, once per session. Screen OnVisible seems the same. I'd be interested to hear of other users' experiences in this regard. But I will say that where I've required dynamic data during runtime, I have used the integration object's OnView event successfully, placing my code above the ViewForm() command. Since this is the default, it will work when opening the (SPO) list item via double click. You will need to add this to the OnEdit() event also though, for users who prefer to use the list toolbar button.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard