Power Apps - Introduction to named formulas Tutorial

Unlock the full potential of Power Apps in our tutorial "Introduction to Named Formulas." Discover how named formulas can simplify user data management and enhance app performance. Learn to effectively retrieve user details like name and email, all while optimizing your application's responsiveness with low code. Dive in and transform your app today!

  • 03:45
  • 0 views
00:00:05
it is essential to manage user data efficiently to personalize the experience
00:00:10
and enhance performance.
00:00:12
Name formulas represent a recent and powerful feature
00:00:16
that allows you to define calculated expressions
00:00:19
once and reuse them throughout the application.
00:00:23
Unlike traditional variables,
00:00:25
name formulas are immutable and automatically recalculate when needed,
00:00:29
greatly simplifying maintenance and improving the app's responsiveness.
00:00:34
In this tutorial,
00:00:35
you will learn how to use name formulas
00:00:37
to retrieve information about the logged in user,
00:00:39
such as their name,
00:00:41
email address,
00:00:42
and profile picture.
00:00:44
We will focus on simple and practical examples
00:00:47
to ensure ease of understanding.
00:00:51
To access information about the logged in user,
00:00:54
a specific data source must be added to the application.
00:00:58
In Power apps on the left-hand panel,
00:01:00
click on data,
00:01:02
then click Add Data Source.
00:01:05
In the search bar,
00:01:06
type Office 365 users,
00:01:09
select the suggested connector,
00:01:11
and if prompted,
00:01:12
sign in using your work or school credentials.
00:01:16
This connection enables your application
00:01:18
to automatically query your professional account
00:01:21
to obtain the necessary data without requiring complex configurations.
00:01:26
The next step involves creating name formulas
00:01:29
that will fetch the user's profile information.
00:01:32
In the application tree view,
00:01:34
select the app object,
00:01:36
then in its properties,
00:01:37
choose formula.
00:01:40
This is where you will centrally write your formulas,
00:01:43
so they can be used throughout the application without code duplication.
00:01:47
The first formula to create is the following.
00:01:51
The name FAX current user is used here as an example,
00:01:55
but you may choose a different name if you prefer.
00:01:58
This formula uses the Office 365 users,
00:02:02
my profile function to retrieve all the details of the currently logged in user.
00:02:07
These include the full name,
00:02:09
professional email address,
00:02:10
phone number,
00:02:11
and other useful properties to personalize the application.
00:02:15
Next,
00:02:15
you need to add a second formula.
00:02:19
Similarly,
00:02:20
FX user photo is a suggested name that you
00:02:22
are free to adapt based on your naming conventions.
00:02:25
This formula allows access to the user's profile picture.
00:02:29
It uses the Office 365 user user Photo V2 function,
00:02:34
which requires the user's unique identifier to retrieve the image.
00:02:39
Instead of making a new complete request to Office 365,
00:02:43
this formula leverages the already available identifier via FX current user,
00:02:48
which optimizes the application's overall performance.
00:02:53
Thanks to these two formulas,
00:02:55
both the user data and their photo
00:02:58
will be accessible throughout your application
00:03:00
without requiring any additional action.
00:03:04
Once the formulas are created,
00:03:06
you can use them to display the logged in user's information on your main screen.
00:03:10
To do this,
00:03:12
insert a text control and use the formula FX current user.
00:03:16
display name
00:03:17
to display the full name.
00:03:20
Add a 2nd text control and refer to FX current user.mil
00:03:25
to display the email address.
00:03:29
Finally insert an image control
00:03:32
and set its image property to FX user photo
00:03:35
to display the profile picture.
00:03:38
All user information will then automatically
00:03:40
appear when the application is launched.

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

 

Mandarine AI: WHAT YOU SHOULD KNOW

Reminder

Show