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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stuck on "Getting your...
Power Apps
Answered

Stuck on "Getting your data..." after clicking on item in gallery

(0) ShareShare
ReportReport
Posted on by 611

When a user clicks on an item in the gallery, the initial form screen gets stuck on, "Getting your data ...". Oddly this goes away if you click back to the gallery and then click on any item in the gallery again. It only happens on the first try.

 

Based on other posters I've tried:

 

1) Reduced the number of lookups back to sql server in order to reduce the amount of data its pulling

2) Switched all of the collections to load concurrently() initially in the app

Concurrent(
 Collect(EmployeeData, '[dbo].[App_PAFNewProj_Emp_vps]'),
 Collect(Loc, '[dbo].[App_PAFNewProj_Loc_vps]'),
 Collect(Cust, '[dbo].[App_PAFNewProj_Cust_vps]')
 ) 

 

3) Added, ResetForm(Form1) into the OnSelect in the Gallery

None of the above has worked.

Any other thoughts? Is there anything I could provide that would be helpful?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @TesDA 

    Please show the  Items and OnSelect properties of the gallery and the Datasource and Item property of the target form.

  • TesDA Profile Picture
    611 on at

    @Drrickryp Sure!

     

    Gallery_Main

    Items: Filter('[dbo].[App_PAFNewProj_Main]', (TextInput1.Text in Agency || TextInput1.Text in ProjName || TextInput1.Text in EntryUserName) And (Dropdown1.SelectedText.Value in PAFProjEntryStatus))

    OnSelect: ResetForm(Form1)

    NextArrow OnSelect: Patch('[dbo].[App_PAFNewProj_Main]', ThisItem, {EditedBy: User().FullName, EditedWhen: Now()}); Set(varFormMode,"edit"); Set(varRecord,ThisItem); Navigate(scrForm1,ScreenTransition.None); 

     

    Screen: scrForm1

    Form: Form1

    DataSource: '[dbo].[App_PAFNewProj_Main]'

    Item: If(varFormMode = "edit", Gallery_Main.Selected, varRecord)

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @TesDA 

    I had a few ideas about your formulae.

    OnSelect:
    Patch('[dbo].[App_PAFNewProj_Main]', ThisItem, {EditedBy: User().FullName, EditedWhen: Now()});
    /*Why Patch at this point when you can have these fields set by defaults in the Edit form?*/
    EditForm(Form1); // This is the preferrred way to set the form mode
    Set(varRecord,ThisItem); 
    Navigate(scrForm1,ScreenTransition.None)
    
    Screen: scrForm1
    Form: Form1
    DataSource: '[dbo].[App_PAFNewProj_Main]'
    Item: Lookup('[dbo].[App_PAFNewProj_Main]',ID=varRecord.ID)
  • TesDA Profile Picture
    611 on at

    @Drrickryp I made the edits you suggested and Getting your data no longer appears, however the first screen/ form isn't defaulting back to the values based on the item clicked in the gallery. If I go back to the gallery and click on the same item or even something different - all of the default values populate correctly. It only happens on the initial click in the gallery after loading the app.

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @TesDA 

    I'm not certain as to why that is except that it is not typical to put a Patch() in the OnSelect property of a gallery that uses an edit form.  I think we are making progress.  As a test, let's simplify! Remove the Patch() and add the fields that you intended to patch to your edit form and make the default properties of the controls in those cards to be what you intended with your patch.  Then, make the following changes.  In the OnSelect of the arrow in the gallery just have

     

    EditForm(Form1);Navigate(scrForm1,ScreenTransition.None)

     

     On the Item property of Form1

     

    Lookup('[dbo].[App_PAFNewProj_Main]',ID=Gallery1.Selected.ID)

     

     See if that helps.  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard