Display version number in Power Apps

Display version number in Power Apps

There’s lots of posts on this, but they seem to mostly point to something other than what I was looking for. Often times, when we as programmers/developers want to show a version number we’re referring to something like this:

Major.Minor.Revision(.Build) – ex: 2.4.1.0

It’s handy for many reasons, especially from an end-user perspective, to ensure the users are using the correct version of something we built! Power Apps maintains versions every time we edit the app. It date-stamps the version and also records the version of the web-based editor you were using at the time. But that’s it. No versioning like we’re used to. Many online examples try to use something like this:

CountRows(
        PowerAppsforMakers.GetAppVersions(
            LookUp(
                PowerAppsforMakers.GetApps().value,
                properties.displayName = "YourAppDisplayName",
                name
            )
        ).value
    )

Which returns the date for me, which is unhelpful. Or this:

CountRows(PowerAppsforMakers.GetAppVersions(First(Filter(PowerAppsforMakers.GetApps().value,properties.displayName = "version")).name).value)

Which flat out didn’t work for me, but in my experience referencing “version” will return the date…again.

This was the only way I could show the current version of my apps:

CountRows(PowerAppsforMakers.GetAppVersions("guid-of-your-app").value)

Maybe I missed something, but this one-liner is a lot shorter and cleaner to me. As always share if you have a better method!

2 thoughts on “Display version number in Power Apps

  1. For Canvas apps only this does work as application version and application build time:
    Settings should be done in App OnStart
    Set(appVersion, Text(CountRows(PowerAppsforMakers.GetAppVersions(“guid-of-your-app”).value),”#”));
    Set(appTimeStamp, Text(PowerAppsforMakers.GetApp(“guid-of-your-app”).properties.appVersion,”mm.dd.yy (hh:mm:ss)”));

Leave a Reply

Your email address will not be published. Required fields are marked *