Fix a Power Apps Form Stuck on “Getting Your Data”

A hotel front desk app I helped with let staff register guests on a tablet. The first guest of the day always went fine. After they pressed Submit, though, the form went blank and just said “Getting your data…” until someone closed and reopened the app. The guest had been saved to SharePoint every time; the form simply had nothing left to show.

This is one of the most common Power Apps form problems, and it comes down to form modes. In this guide, I’ll explain why it happens and the fixes that make it go away for good.

Quick answer: After a successful SubmitForm, a form that was in New mode switches to Edit mode, and with no record in its Item property it shows “Getting your data…”. Put NewForm(Form1) in the form’s OnSuccess property (after any ResetForm), set DefaultMode to FormMode.New for a create-only form, and call NewForm before navigating to the form screen.

Why the form gets stuck

Here’s what the guest registration screen looked like after the first submit:

Power Apps Guest Registration Form showing Getting your data instead of the form fields

An edit form is always in one of three modes: New (a blank record), Edit (the record in the Item property) or View. A few actions change the mode behind your back:

ActionMode afterwards
NewForm(Form1)New
EditForm(Form1)Edit
ViewForm(Form1)View
SubmitForm(Form1), when it succeeds in New modeEdit (showing the record you just saved)
ResetForm(Form1), in New modeEdit
Nothing setEdit, the default

So after the first save, the form is in Edit mode. If its Item property is empty, or points to a variable that isn’t set, there’s no record to display, and the form shows the loading message instead of fields. Every fix below makes sure the form is back in New mode, or has a valid Item, whenever someone looks at it.

The sample app

The app has a Welcome Screen, a Main Screen with an edit form (Form1) connected to a SharePoint list of guest registrations, and a Success Screen. The Submit button started with just:

SubmitForm(Form1)
Submit button OnSelect with SubmitForm on the guest registration form

Fix 1: Start every visit in New mode

On the Welcome Screen, the button that opens the form should put it in New mode first:

NewForm(Form1); Navigate('Main Screen', ScreenTransition.Fade)
Welcome screen button OnSelect with Navigate and NewForm

For a form that only ever creates records, also set the form’s DefaultMode property to FormMode.New. That’s the mode it starts in when the app opens.

Fix 2: Do the follow-up in OnSuccess

Keep the Submit button to SubmitForm(Form1) only, and put what should happen next in the form’s OnSuccess property:

ResetForm(Form1);
NewForm(Form1);
Navigate('Success Screen', ScreenTransition.Fade)

The order matters: ResetForm clears the fields but switches a new form to Edit mode, so NewForm has to come after it.

You may see this written on the Submit button instead: SubmitForm(Form1); ResetForm(Form1); NewForm(Form1). Avoid it. Those last two run even when the save fails, for example because a required field is empty or the connection dropped, and they wipe what the person typed. OnSuccess only runs when the record was really saved. To show what went wrong otherwise, add a label with Form1.Error.

On the Success Screen, a “Register another guest” button can go straight back to a fresh form:

NewForm(Form1); Navigate('Main Screen', ScreenTransition.None)

In OnSuccess, Form1.LastSubmit holds the saved record, so you can show something like “Registration #” & Form1.LastSubmit.ID on the Success Screen.

Fix 3: A reset button that doesn’t break the form

A reload icon that clears the form is handy, but ResetForm(Form1) on its own switches a new form to Edit mode and brings the problem right back. Use both:

ResetForm(Form1); NewForm(Form1)
Reload icon OnSelect with ResetForm on the guest registration form

Fix 4: Reset the form when the screen opens

As a safety net, set the Main Screen’s OnVisible property:

NewForm(Form1)
Main screen OnVisible property set to NewForm

Now the form is in New mode whenever someone arrives on the screen, however they got there.

If the form edits existing items

When the same form creates and edits records, Edit mode is correct, but it needs a record. Set it from the gallery:

Set(varSelectedItem, ThisItem); EditForm(Form1); Navigate('Main Screen')

and set the form’s Item to varSelectedItem. If Item points to something blank, you get the loading message again. See how to get the selected value from a gallery for this pattern.

Other causes to check

  • SharePoint custom forms don’t close. In a form customized from a SharePoint list, keep RequestHide() in the SharePointForm’s OnSuccess (the default is ResetForm(SharePointForm1); RequestHide()). Without it, SharePoint doesn’t know the form is done.
  • A variable isn’t ready yet. App.OnStart doesn’t block the first screen, so a form whose Item depends on a variable set in OnStart can load before the variable exists. Use a named formula in App.Formulas, or set the variable in the screen’s OnVisible.
  • The list changed. If you renamed or deleted columns, refresh the data source in the Data pane and re-add any broken cards.
  • Galleries don’t show the new record. After SubmitForm, the data source refreshes automatically. You only need Refresh() if the gallery is based on a collection or another copy of the data.
  • It’s just slow. Use Live Monitor (Advanced tools > Monitor) to see which call takes the time.

These Power Apps form tutorials may help:

Frequently Asked Questions

Why does my Power Apps form say “Getting your data” after I submit?

A successful SubmitForm switches a new form to Edit mode, and with no Item there’s nothing to show. Call NewForm in OnSuccess. Microsoft explains the form modes in the form functions reference.

Should I put ResetForm and NewForm on the Submit button?

No. Put them in the form’s OnSuccess property, so they only run when the save succeeds and don’t clear the user’s input after an error.

Why does ResetForm make the form go blank?

In New mode, ResetForm switches the form to Edit mode. Call NewForm right after it.

How do I make a form always open for a new record?

Set the form’s DefaultMode to FormMode.New, and call NewForm before navigating to its screen.

2 thoughts on “Fix a Power Apps Form Stuck on “Getting Your Data””

  1. Hello Bijay, I have learnt many things from your posts. I also got stock at this issue. I have Home Screen with 3 other screens. On the 3 other screens I have filters, a gallery and an edit form. Gallery is filtered. When I was working in Build mode, everything worked correctly, but after publishing Io get the mentioned error. Sometimes using filter do a trick and brings in the edit form. Any tip where to check?

  2. It is me again – it seams that there were some issues with the filters
    Filter(OpportunititesAll,
    OpportunityNameSearch.Value in ‘Opportunity Name’
    && AccountNameSearchO.Value in ‘Account Name’.Value //choice field in Sharepoint list
    && (RegionSearchO.Selected.Value=’Opportunity Region’.Value || RegionSearchO.Selected.Value=Blank()) //radio button, datasource is choice field from Sharepoint
    &&(‘Opportunity Owner’=userFilter || userFilter=Blank()) //set variable at the beginning to determin User
    )

Comments are closed.