cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

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

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.  

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

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

Hi @TesDA 

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

Helper V
Helper V

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

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

Highlighted
Super User III
Super User III

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

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)
Highlighted
Helper V
Helper V

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

@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.

Highlighted
Super User III
Super User III

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

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.  

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,333)