
Unlock the secrets of dynamic UI and transform your Power Apps into interactive and responsive masterpieces
Setting the Stage for Dynamic Interfaces
If you are new to the world of Power Apps, it is where we blend our creativity with technology to build some seriously powerful and helpful applications. In this particular exploration we will be diving into an inventory management application for Dusty Bottle Brewery.
Our focus? Dynamic user interfaces (UI). It is all about making an app that is not only functional but also engaging and intuitive. Imagine an inventory app that adapts in real-time, showcasing inventory updates, new arrivals, and even alerts when a popular brew or item is running low. That is the power of dynamic UI in action, it makes our app come alive.
Join me as we explore Power Apps and learn how to transform a standard inventory management application into an interactive and responsive tool. We will dive into leveraging visible properties, integrating role-based elements, and much more. Whether you are an expert or just starting, come along on this exciting journey to create a dynamic and vibrant app.
The Magic of Visible: More Than Meets the Eye
The Visible
property in Power Apps is crucial for creating a dynamic app at Dusty Bottle Brewery and forms the cornerstone of creating an engaging user experience. Using this property effectively is focused on displaying the right information at the right time for a sleek yet informative interface.
Here’s how it works in action: when we open our Inventory App, we are brought to a dashboard showing current stock levels. This main dashboard uses the visible property of various elements to dynamically show additional information for each item.
For example, each item shows a stock status badge indicating if the stock level is good, average, low, or extremely low. This is all made possible leveraging the visible property of these objects. It’s more than just hiding and showing object, we are creating a responsive experience that adapts to user interactions.
Let’s dive into the information (i
) icon and the details it has to offer. By selecting the i
icon for a product, we reveal additional information like the recommended order amount, cost per unit, and total cost for the recommended order.
Time to see how it works with some practical expressions. Below is the main dashboard. Notice how the information (i
) icon appears on the selected item. This is accomplished by setting the visible property of the icon to ThisItem.IsSelected
.
Additionally, by selecting this icon the user can display additional information. This information provides just in time insights. Providing for a responsive experience that displays all the required information at just the right time leaving a clean and simple dashboard with hidden power that is revealed through user interactions.

We use a variable to set the Visible
property of the informational items. For the informational icons OnSelect
property we use:
UpdateContext({locInfoVisible:!locInfoVisible});
The locInfoVisible
variable toggles between true
and false
, acting as a switch. The pattern of using !
(i.e. not) and a boolean variable is helpful for flipping the variable’s value between true
and false
.
We are not limited to boolean variables to control our app objects visibility. Any expression that evaluates to true
or false
will work. An example of this within our app is the stock status badges. Each icon has its own specific condition controlling its visibility.
For each product we calculate the percentage of our target stock count. In the app we store this value in the text label lbl_Main_StockEval
.
For example, the Extremely Low icon’s visible property is set to
Value(lbl_Main_StockEval.Text)<=20
This results in the icon showing only when the expression evaluates to true
, that is if the item stock is less than or equal to 20% of the target amount.

Effectively pairing expressions with the visible property streamlines our app’s interface, focusing attention on what is most relevant. This elevates our apps from functional to intuitive and powerful.
User Roles and UI Elements: A Match Made in Heaven
Customizing apps based on user roles is crucial for any organization. Although this type of customizing includes things such as access control, it can go way beyond just that. Customizing our apps for different user roles is focused on making our apps more intuitive and user-friendly while recognizing what that means may differ for each individual or for each user role.
Let’s, examine a scenario with our Dusty Bottle Brewery inventory app where personnel should see a simplified dashboard focused on just their area of responsibility. Staff in the Brewing department should only see brewery related inventory, staff in the Sales and Marketing should only see merchandise related inventory, while staff in Logistics and Supply Chain should be able to view all items. This is where the flexibility of Power Apps shines, allowing us to tailor our apps based on the current user.
We first need to add the Office 365 Users data connector which then allows us to set UserProfile
to the current user’s profile. In the Formulas
property of the App object we add the following Named Formula:
UserProfile = Office365Users.MyProfileV2();
Note: This can also be done with a global variable by adding the following to the OnStart
property of the App object.
Set(gblUserProfile, Office365Users.MyProfileV2());
The user profile provides the required information to personalize the user experience for our app. For example, we use UserProfile
to welcome the current user in the top right of the app.

Next, we use the user’s department to control the data presented on the dashboard, ensuring relevant information is highlighted.
To add this role-based feature we add the following to the App OnStart
property to pre-load the appropriate data.
Switch(
true,
UserProfile.department = "Brewing",
ClearCollect(
colSpInventory,
Filter(
Inventory,
Category.Value = "Beer"
)
),
UserProfile.department = "Sales and Marketing",
ClearCollect(
colSpInventory,
Filter(
Inventory,
Category.Value = "Merchandise"
)
),
UserProfile.department = "Logistics and Supply Chain",
ClearCollect(
colSpInventory,
Inventory
)
);
Here we filter the collection of inventory items (colSpInventory
) based on the user’s department. This collection is then used in the Items
property of the gallery displaying the inventory items. This approach enhances the efficiency and reducing clutter within our app.
For instance, Dusty Bottle’s Lead Brewer, Adele Vance, sees only brewery items, streamlining her experience. This helps Adele identify brewery items that are low in stock and provides all the information she requires without cluttering the dashboard with irrelevant information.

What is the most exciting about this level of control is the possibilities of the personalization aspect.
For example, let’s build on this role-based feature by expanding it beyond the user’s department. Dusty Bottle Brewery has a management team containing members of all departments and the members of this group should be able to see all inventory items. This group of users is defined by a Microsoft 365 group, and we will leverage the group’s membership to add this functionality to our app.
First, we add the Office 365 Group data connector to our app. Similar to Office 365 Users, this allows us to use Office365Group.ListGroupMembers
to get all the members of our Management group.
Then we add another Named Formula to the Formulas
property of the App.
ManagementMember = !IsBlank(
LookUp(
Office365Groups.ListGroupMembers("
Let’s break this down, starting from the inside working out. We provide Office365Groups.ListGroupMembers
the object id of the required group, this then provides a record. The record property value
contains the membership user information we are looking for. We then use LookUp
to see if the current user’s display name is within the group members. If the returned record from LookUp
is not (!
) blank, then the user is a member of the management group, and ManagementMember
returns a value of true
, otherwise false
.
Finally, we update the OnStart
property of our app to the following.
Switch(
true,
UserProfile.department = "Brewing",
ClearCollect(
colSpInventory,
Filter(
Inventory,
Category.Value = "Beer"
)
),
UserProfile.department = "Sales and Marketing",
ClearCollect(
colSpInventory,
Filter(
Inventory,
Category.Value = "Merchandise"
)
),
ManagementMember || UserProfile.department = "Logistics and Supply Chain",
ClearCollect(
colSpInventory,
Inventory
)
);
Providing each user or group a tailored interface that feels like it is made just for them. Using these role-based approaches we can deliver the right tools and information to the right people at the right time.
Input-Driven Interfaces: Reacting in Real-Time
In the dynamic environment of any organization, an input-driven interface can significantly improve the user experience by responding to user actions in real-time. This approach makes the app both intuitive and interactive.
For example, updating inventory involves selecting an item from the main dashboard to access its restocking screen. On the restocking screen the user is provided all the essential information for restocking an item.

This screen shows the cost, stock status indicator, stock count, and the target stock count on the left. On the right, is a dynamic input control and what the stock indicator would be if the input quantity is restocked. The default of this control is the difference between the current stock and the target stock value.
The input-driven interface updates information based on user input, ensuring accuracy and responsiveness. For instance, changing the restock quantity automatically updates the related information (e.g. Restock Total Cost).
What if the user is only able to restock 10 of these baseball caps. After updating the Restock Quantity input, we see the change reflected in the Restock Total Cost.

We achieve this by referencing the restock quantity (txt_Restock_QuantityAdded
) in the text label displaying the total cost and the visible property fields of the stock indicator badges. The total cost label’s text property is set to the following.
Text(
Value(txt_Restock_QuantyAdded.Text * gblSelectedItem.Cost),
"$#,##0.00"
)
But the possibilities don’t have to end there. The app could integrate sliders or dropdown menus for inventory updates. As the user adjusts these controls, the interface could dynamically show the impact of these changes.
This approach can be extended to handle complex scenarios, like entering a new item, where the app reveals additional fields based on the item category or other properties. This can help keep the interface clean while also guiding the user through data entry in a logical, step-by-step manner.
Harnessing the power of input-driven interfaces transforms our apps into responsive companions, adapting to user needs and simplifying tasks.
Buttons and Actions: Bringing Our Interfaces to Life
Interactive buttons and actions play a pivotal role in bringing the user interface to life. They create engaging and interactive experiences for our users.
Consider our simple action of updating stock levels in our inventory app. Selecting the Restock button updates the stock value and, if successful, presents a success message to the user. This immediate feedback reassures users and enhances their interaction with the app.

Additionally, we can tailor buttons and actions for different user roles. For example, enabling the Restock button only for management staff. Using the ManagementMember
named formula created previously, we set the DisplayMode
of the Restock button to the following.
If(ManagementMember, DisplayMode.Edit, DisplayMode.Disabled)
By thoughtfully integrating these elements, we turn mundane tasks into engaging interactions, making our apps an integral part of the daily workflow.
Tying It All Together: Crafting a Seamless Navigation Menu
As our apps grow in complexity and expand, easy navigation becomes crucial. A well-crafted navigation menu integrates all the dynamic UI features we have discussed into one cohesive, user-friendly package.
First, the navigation menu’s visibility is a key aspect and is controlled by the Visible
property. We can make the navigation menu appear and disappear with a simple button click. This approach keeps the interface clean and uncluttered, allowing users to access the menu when needed and hide it when focusing on other tasks. We us a hamburger menu icon to launch the menu when selected using the following for its OnSelect
property.
UpdateContext({locNavigationVisible: true})
Additionally, we will set the Visible
property of the hamburger icon to !locNavigationVisible
. This will hide the icon after it is selected allowing us to show a cancel icon that when selected will hide the navigation menu. The Cancel icon’s OnSelect
property is set to the following.
UpdateContext({locNavigationVisible: false})
While its Visible
property is set to locNavigationVisible
.

Next, we enrich the navigation with selectable icons and actions that allow users to effortlessly navigate between the different screens of our app. Each icon in the navigation menu is linked to a different screen in the app. Using the Power Apps Navigate
function and the OnSelect
property of the icons seamlessly transports the users to the desired screen, enhancing the app’s overall usability and flow.
Lastly, we tailor the navigation experience to different user roles. For instance, links to admin-specific screens. Above, we can see the navigation menu includes a button to navigate to the Admin screen. This screen should only be accessible to staff within the Logistics and Supply Chain department. To do this we add the following named formula to our App’s Formulas
property.
AdminUser = UserProfile.department = "Logistics and Supply Chain"
We can then set the Visible
property of the Admin button within the navigation menu to AdminUser
. This will make this navigation button visible if the current user is within the Logistics and Supply Chain department and hide this option for all other staff.
Now, we can see that the Admin navigation icon is visible to Grady, who is within the Logistics and Supply Chain department.

However, when Adele uses this app, who is not in this department, the navigation icon is not shown.

By integrating these elements, the Inventory Management app’s navigation becomes a central hub that intelligently adapts to user needs and roles.
Wrapping Up: The Future of Dynamic UI in Power Apps
As we wrap up our journey through Dusty Bottle Brewer’s Inventory App, it is clear that the future of dynamic UI in Power Apps is here and now. Harnessing the power of features like the Visible
property, role-based UI elements, input-driven interfaces, and more, we have seen how an app can transform from a simple tool into an essential part of the organizational ecosystem.
The power of Power Apps lies in its ability to continuously evolve allowing us to iterate on our apps, enhancing their responsiveness and efficiency. This inventory app showcases how technology meets business needs and enhances user experiences.
As we build upon our apps the possibilities are varied and exciting. We can incorporate more advanced integrations, AI-driven functionalities, and even more user-friendly designs. The goal will always remain the same: to create applications that are not just functional, but intuitive, responsive, and easy to use.
Here’s to the future of dynamic UI in Power Apps – a future where technology meets user needs in the most seamless and engaging ways possible. Cheers to that!
Thank you for reading! Stay curious, and until next time, happy learning.

And, remember, as Albert Einstein once said, “Anyone who has never made a mistake has never tried anything new.” So, don’t be afraid of making mistakes, practice makes perfect. Continuously experiment, explore, and challenge yourself with real-world scenarios.
If this sparked your curiosity, keep that spark alive and check back frequently. Better yet, be sure not to miss a post by subscribing! With each new post comes an opportunity to learn something new.