Power Apps - Define centralized visibility rules Tutorial

Unlock the power of centralized visibility rules in your enterprise applications! Discover how to control access to sensitive content with simple name formulas, ensuring consistency and scalability in your Power Platform projects. Learn to streamline visibility for managers and adapt rules effortlessly. Don't miss out on making your low-code solutions more effective!

  • 02:28
  • 0 views
00:00:05
certain content must be accessible only to specific users.
00:00:09
For example,
00:00:10
an administration screen or a sensitive button
00:00:13
should only be visible to a manager or an administrator.
00:00:17
Instead of writing the condition directly into each control,
00:00:21
it is better to centralize the rule using a name formula.
00:00:25
This ensures perfect consistency throughout the application.
00:00:30
In the application tree view,
00:00:32
select the app object.
00:00:34
Then in its properties go to formulas.
00:00:37
You will now create a name formula that determines whether
00:00:41
the current user is authorized to view certain elements.
00:00:45
Enter the following formula.
00:00:47
Here we use a simple condition.
00:00:50
If the user's job title is exactly equal to manager,
00:00:54
then the formula returns true.
00:00:57
Otherwise,
00:00:57
it returns false.
00:00:59
The name FM says managers provided as an example,
00:01:03
but of course,
00:01:04
you can adapt the name according to your context and internal naming conventions.
00:01:10
Once the formula is created,
00:01:12
you can use it to control the visibility of a button,
00:01:15
a label,
00:01:16
or even an entire screen.
00:01:19
For example,
00:01:20
select a button intended for managers and in
00:01:23
the visible property simply write FX is manager.
00:01:27
The button will then be visible only if the formula returns true,
00:01:31
that is only for users whose job title is manager.
00:01:36
In this way,
00:01:37
all visibility logic is centralized and easy to update.
00:01:41
In some cases,
00:01:42
the visibility rules may be more complex.
00:01:45
For instance,
00:01:47
you might allow access either to managers or to users from a specific department.
00:01:53
In that case,
00:01:53
the formula could be written as follows.
00:01:56
Thus,
00:01:56
the button would be visible to a manager or
00:01:59
to an employee from the human resources department.
00:02:02
It is important to group all this logic in the name formula
00:02:06
to maintain a clean and easy to maintain application.
00:02:10
Thanks to name formulas,
00:02:12
managing conditional visibility of elements and power
00:02:15
apps becomes much simpler and more consistent.
00:02:18
By centralizing display rules,
00:02:21
you ensure better scalability of your application
00:02:24
while making it easier to read an update.

No elements match your search in this video....
Do another search or back to content !

 

Mandarine AI: WHAT YOU SHOULD KNOW

Reminder

Show