cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
blanghorst
Helper IV
Helper IV

PowerApps caching views

I've got a PowerApps application built on a SharePoint list.  When the application loads, it runs a Flow to determine SharePoint group membership and sits at a "Please Wait" screen while that runs.  Once completed, the form logic will display a form screen determined by the Status column in the SharePoint list.

 

Here is what is happening.  When I go to the list and click "NEW," the form loads, runs the Flow, and then sends the form to the "NEW" screen.  I complete the form and submit it.  After the submission is complete, I immediately click "NEW" again.  At this stage, the Flow does not seem to run and the "Please Wait" screen is skipped - the form goes right to the "NEW" view.  It's as if the rules in the OnStart parameter of the App are being skipped  - almost like the previous view was cached.

 

Any thoughts?   I want the rules in the OnStart event of the App to run EVERY time.

 

 

13 REPLIES 13

I've found a couple of additional issues that I'm working to resolve.   I think I know the answer to this question, but I'll ask - is there any way to force a browser refresh on form submit?  I think that would resolve many of these issues.

@blanghorst 

You cannot refresh the browser but you can refresh a datasource

 

Refresh(your_datasource_name);

 

Yeah, I've got data source refreshes happening already.   I'll summarize my current issue:

 

1. User opens new form, completes fields, and submits.

2. User immediately opens new form, completes fields, and tries to submit again.  The submit doesn't happen - no errors, nothing.

 

I have the submit being fired off of a timer after the button click, as we were having performance issues which the timer resolved.  I found that the variables controlling the timer persisted across #1 and #2 above, so I set the timer variable to false in the OnVisible attribute and that resolved that issue.  Still troubleshooting why it isn't submitting the seccond time - I think that's the only issue remaining and I think I'll be able to resolve it.

 

I did think about possibly using Launch to launch the list view again on submit, but that could get out of hand really fast with a bunch of tabs.

 

If I had it to do over, I would've used canvas apps to build these 2 apps.

@blanghorst 

Agreed, Canvas apps seems like they they were the way to go here.  But you gotta build apps to learn lessons, right?  At least that's what happens for me...

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,464)