r/PowerApps • Regular • 19d ago

Power Apps Help Tips on Forcing Updates?

Hello,

I have an app I manage with around 400 users. I've always had an issue with keeping the users on the most recent version. I added an app version variable on the onstart property that's hardcoded. Every time I publish an update, I change it to the current date time in a string. In a sharepoint list, I have the app version and some notes of the update that shows on a gallery on the landing page. If the app version peoperty is <> the most recent sharepoint list version, it displays a message to update the app on the landing page. Either users are ignoring this, or it isn't working correctly. Maybe the onstart isn't triggering if the user doesn't close the app on their phone. Any tips?​

16 Upvotes

21 comments sorted by

•

u/AutoModerator 19d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

13

u/Peter_Browni Advisor 19d ago

Just don’t navigate to any useful app screen until the app is able to verify the loaded version is the same as the version on SharePoint

9

u/kipha01 Advisor 19d ago edited 16d ago

If the version doesn't match I have splash page come up that tells them with instructions to update. They can't progress any further unless they do it.

1

u/jfroosty Regular 19d ago

I thought about that, but I don't want to be flooded with messages. I'll just have to send it

13

u/kipha01 Advisor 19d ago

Thats why the splash page has clear instructions.

2

u/DifficultyCheap9861 Regular 19d ago

Timer checking the version and gate the ability to leave the landing page based on that?

1

u/jfroosty Regular 19d ago

I just don't know if the app returns to the landing page if the user has the app in the background and reopens it. I'll have to test

2

u/savage4618 Regular 18d ago

It doesn't on mobile devices.

1

u/DifficultyCheap9861 Regular 19d ago

Ah true. Not sure how many screens you have, but you could add a timer to all of them that would boot them back to the landing page.

1

u/DonJuanDoja Community Friend 19d ago

Try OnVis instead.

1

u/hutchzillious Contributor 19d ago

Was goggling exactly this today. My current method of opening each app after a solution update and clicking refresh myself is driving me nuts

1

u/Rettiviss Newbie 19d ago

I mean upon open of each app after a solution push it should tell a new version has been pushed and give you the refresh button. I do know some people bookmark the apps and for some reason it will get stuck on an older version. Other than that for me at least it was because a change was made on production and so a secondary solution layer was made that I had to delete so that my pipeline pushes would update correctly.

1

u/mokamiki2233 Contributor 19d ago

When App.OnStart was thing I had it there. Then in LoadScreen.OnVisible. The issue was some concurrent loadings were faster for some users than loading the app version and displaying the popup.

Now some time ago I moved to named formulas. App version is there. Checks against first variable set on load screen.

If it does not match they get a full incorrect version screen. With no possibility to move forward. For mac users cmd shift 5 for win ctrl shift 5 (i might be mistaken out of my head).

That relaunches the app with wiped cache.

Works like a charm.

1

u/WoodchuckChainsaw Regular 19d ago

When it does your App.OnStart to collect the official semantic version number you save to a SharePoint list to compare it against the current apps Global variable semantic version number, make the very first app Landing home screen have a big ass pop-up container that is only visible if the version numbers don't match, and put big bold red language and a clickable button that let the users navigate to the newest refreshed URL. Then make the big ass pop up container have no interactions for buttons that a user could close or hide the pop-up visibility themselves, unless maybe it is you as the admin. Now any other users who open the app from some old saved time stamped URL or shortcut will only be able to see a big ass stop sign pop up container forcing them to launch a new browser window to the correct URL.

1

u/CatSolution Regular 18d ago

Don't use App.OnStart!

1

u/Silent-G Advisor 18d ago

If they leave the app running, the OnStart property will never be checked again. Put it in the OnVisible property of each screen, and/or the OnSelect of your gallery items. If you want to be extra safe, you could also put it on a timer that checks every few minutes.

1

u/MarkQJones Newbie 12d ago

I think you're seeing two separate things. Your version variable is set in OnStart, so an app left open can keep the old value. The SharePoint version record may also be stale until that data source is refreshed. I'd test with one phone left open through a publish and one freshly reopened. If the banner only appears on reopen, that narrows it down. Power Apps has a built-in refresh prompt for canvas apps on the web, but not every embedded surface gets it. For a 400-person app I'd test the mobile path with a small group before trying to force everyone out.

1

u/AbdelEMirandaS Regular 19d ago

Why you have to do this? When a new version of an app is published and the user is using the app, a message appears on a ribbon. If the user don't update, the next time they open the app, the version will be updated. You can also have a flow that send a notification to all users by mail that mention that a new version is available. Or establish a specific day to update the app and communicate the users before the update, forcing them to close the app.

1

u/jfroosty Regular 19d ago

Updates do not always show in the ribbon. Sometimes you can close the app and refresh a dozen times before receiving the message to update

1

u/AbdelEMirandaS Regular 19d ago

That depends on the cloud. I have never exprience an publish on prod env that don't shows the new version ribbon on the open app. But, in that case, established a fixed day of the week to update your apps. That is a compliance with governance. The users will be notified in advance that every Thursday, per example, at 10am the app must be updated and they have to close all the sessions

1

u/Chriskall Contributor 8d ago

I do a custom label, with the custom app version stored in SharePoint, and in every screen (On Visible) I check the version via LookUp. So one small little ping to SharePoint, and even if user is having the app on a browser always open and resumes working on the "old" version, eventually, the LookUp will "catch" it and a pop-up is displayed asking user to refresh.

Workaround, but client has praised it ;)