How to Display PowerApps Latest Version in Label Control
In this article, we’ll guide you through the steps to find the least version and published version of a PowerApp. This feature is crucial for tracking app versions, ensuring version control, and keeping users informed about the app’s lifecycle.
Step 1: Add the PowerApps for Makers Connection
To retrieve version details, you need to add the PowerApps for Makers connection to your app.
- Open PowerApps Studio and go to the Data tab.
- Click on Add data.
- Search for PowerApps for Makers and add it to your app.
Step 3: Retrieve App ID and Implement the Formula
To display the correct version information, you’ll first need to obtain the App ID of your app. The gblappid
is the App ID, which you can get from the app details.
Once you have the App ID, you can use the following formula to retrieve the version details and store them in global variables:
Set(gblappid, "<App ID>"); // Replace <App ID> with your actual App ID
Set(gblappversions, PowerAppsforMakers.GetAppVersions(gblappid).value);
Set(gblpublishedversion, LookUp(gblappversions, properties.lifeCycleId="Published").properties.appVersion);
Set(gblpublishedversionnumber, CountRows(Filter(gblappversions, properties.appVersion<=gblpublishedversion)))
- Set(gblappid, “<App ID>”): Set this to the unique App ID of your app, which you can obtain from the app details.
- Set(gblappversions, PowerAppsforMakers.GetAppVersions(gblappid).value): Retrieves all the versions of the app.
- Set(gblpublishedversion, LookUp(gblappversions, properties.lifeCycleId=”Published”).properties.appVersion): Finds the published version of the app.
- Set(gblpublishedversionnumber, CountRows(Filter(gblappversions, properties.appVersion<=gblpublishedversion))): Finds the current version count by counting all versions up to and including the published version.
Add a Label Control
Next, you will need to add a Label control to your app where you will display the version information.
Position the label on your screen where you want to show the version details.
Go to the Insert tab and select Label.
Step 4: Display the Least and Published Version Numbers
Now, you can display the version information in your label control. In the Text property of the label, use the following formulas to display both the published version number and the current version count:
- Display All App Version Count: This will show the total number of versions of the app:
- Code:
"All App Version Count V" & CountRows(gblappversions)
- Display Current Version Count: This will show the count of the current version, which is the number of versions up to and including the published version:
- Code
"Current Version Count V" & gblpublishedversionnumber
Both of these formulas will be shown in the label, giving the user clear details about how many versions are available and which one is currently being used.
Why Use the PowerApps for Makers Connection?
The PowerApps for Makers connection is necessary to access detailed app version information. It allows you to:
- Retrieve the list of app versions.
- Identify the published version.
- Count the current version number based on the version history.
Conclusion
By following the steps in this guide, you can find both the least version and the published version of your PowerApp. This provides users with transparency about the app’s version, which is especially important for tracking updates.
Tips for Maintaining App Version Control
- Implement a versioning scheme: Adopt a consistent versioning format (e.g., major.minor.patch) to make versioning clearer.
- Document version changes: Always keep track of what changes have been made in each version.
- Test new versions thoroughly: Ensure that each update is well-tested before release to avoid errors in production.
Explore more about PowerApps for Makers and use it to efficiently manage your app’s lifecycle and versioning.
Related Resources:
✨ Thanks for reading! ✨
I hope you found this blog on the Microsoft Power Platform helpful! From Power Apps, Power Automate (Cloud & Desktop), Canvas Apps, Model-driven Apps, Power BI, Power Pages, SharePoint, Dynamics 365 (D365), Azure, and more, I cover a wide range of topics to help you harness these powerful tools. Don’t miss out on future tips, tutorials, and insights—hit that subscribe button to get the latest posts right to your inbox. 💌💬 I’d love to hear your thoughts! Drop a comment below with your questions, ideas, or feedback—let’s get the conversation started!🔗 Let’s connect and grow together!
Follow me, Ravindra Jadhav, on your favorite platforms for even more content and updates on Microsoft Power Platform and related technologies:
💼 LinkedIn – Let’s network and share ideas!
💻 GitHub – Explore my projects and code.
🐦 Twitter – Stay updated with quick tips and industry news.
📺 YouTube – Watch tutorials and deep dives on Power Platform, Power Apps, Power Automate, and more!Let’s build something amazing together with Power Platform and Azure! 🚀
Pervious Blog
good