1
00:00:00,000 --> 00:00:04,460
A formula in Excel can total economy in seconds, and now imagine that same kind of formula

2
00:00:04,460 --> 00:00:09,180
deciding whether an approval button appears in an app, calculating an expense claim, or

3
00:00:09,180 --> 00:00:12,740
changing what a user sees after they fill in a form.

4
00:00:12,740 --> 00:00:13,740
That is PowerFX.

5
00:00:13,740 --> 00:00:18,580
Hello everyone, and welcome to another episode of Microsoft Knowledge Nuggets here on M365.

6
00:00:18,580 --> 00:00:23,120
FM, I'm Mercopeterz, and today we're talking about Microsoft PowerFX in plain English.

7
00:00:23,120 --> 00:00:26,620
You may have heard the name while looking at Power Apps in thought, "Is this coding?

8
00:00:26,620 --> 00:00:30,600
Do I need to learn a whole programming language before I can build anything useful?"

9
00:00:30,600 --> 00:00:31,600
Not really.

10
00:00:31,600 --> 00:00:34,620
PowerFX is Microsoft's formula language for the Power Platform.

11
00:00:34,620 --> 00:00:38,240
It brings a familiar spreadsheet way of thinking into app building, so you can create rules

12
00:00:38,240 --> 00:00:43,440
for screens, forms, lists, buttons, and business data without starting from the world of traditional

13
00:00:43,440 --> 00:00:45,140
code.

14
00:00:45,140 --> 00:00:47,240
Think of Power Apps like a modern office building.

15
00:00:47,240 --> 00:00:51,360
The screens are the rooms, a form is a room where someone enters a request, a list is a

16
00:00:51,360 --> 00:00:54,080
room where a manager reviews those requests.

17
00:00:54,080 --> 00:00:56,800
A button is a door someone can press to move forward.

18
00:00:56,800 --> 00:00:59,560
PowerFX is the set of small rules behind the scenes.

19
00:00:59,560 --> 00:01:03,900
It controls what a light switch does, when a door should stay locked, and which sign appears

20
00:01:03,900 --> 00:01:06,120
when a request needs more information.

21
00:01:06,120 --> 00:01:07,560
Most users never notice those rules.

22
00:01:07,560 --> 00:01:10,880
They just see an app that responds to them, and that matters because business apps are

23
00:01:10,880 --> 00:01:11,880
full of rules.

24
00:01:11,880 --> 00:01:15,320
A person enters hours and a rate, then the app needs to show a total.

25
00:01:15,320 --> 00:01:18,680
Someone chooses a request type, then the app may need to show more fields.

26
00:01:18,680 --> 00:01:22,760
A manager opens a list and needs to see only the requests waiting for approval.

27
00:01:22,760 --> 00:01:26,760
Not logic, those are just boxes, labels, and buttons sitting on a screen.

28
00:01:26,760 --> 00:01:28,640
PowerFX gives those parts a job.

29
00:01:28,640 --> 00:01:31,720
Over the next few minutes we'll start with the Excel mindset you already know and then

30
00:01:31,720 --> 00:01:36,760
move from spreadsheet cells to app properties, so you can see why a formula can control text,

31
00:01:36,760 --> 00:01:38,840
color, visibility, and more.

32
00:01:38,840 --> 00:01:42,960
After that we'll look at how formulas help apps respond to people and work with business

33
00:01:42,960 --> 00:01:43,960
information.

34
00:01:43,960 --> 00:01:47,680
But first, let's begin with the familiar part, because if you understand how a spreadsheet

35
00:01:47,680 --> 00:01:51,960
formula thinks, you already have a strong starting point for PowerFX.

36
00:01:51,960 --> 00:01:56,400
And block one, from spreadsheet cells to app properties, 550 words.

37
00:01:56,400 --> 00:01:58,880
Most people feel nervous when they hear the word code.

38
00:01:58,880 --> 00:02:02,400
But if you've ever typed a formula into Excel, you've already worked with a simple form

39
00:02:02,400 --> 00:02:03,400
of logic.

40
00:02:03,400 --> 00:02:07,560
You entered value somewhere, wrote a formula that used those values, and Excel returned

41
00:02:07,560 --> 00:02:08,560
an answer.

42
00:02:08,560 --> 00:02:12,400
Maybe it was a total, a date, or a message such as, over budget.

43
00:02:12,400 --> 00:02:14,280
PowerFX uses that same basic pattern.

44
00:02:14,280 --> 00:02:15,880
Here's the simplest definition.

45
00:02:15,880 --> 00:02:20,200
It's Microsoft's Excel-like formula language for Power Platform tools, especially Power Apps.

46
00:02:20,200 --> 00:02:23,920
It lets you tell an app what something should show when something should appear, or how

47
00:02:23,920 --> 00:02:26,800
a value should change based on the information around it.

48
00:02:26,800 --> 00:02:28,520
In Excel, a formula lives in a cell.

49
00:02:28,520 --> 00:02:30,800
You might type something like x, b2, c2.

50
00:02:30,800 --> 00:02:34,960
If b2 contains the number of hours, and c2 contains an hourly rate, the cell with the

51
00:02:34,960 --> 00:02:36,960
formula shows the total pay.

52
00:02:36,960 --> 00:02:39,160
Change either number, and Excel updates the answer.

53
00:02:39,160 --> 00:02:40,480
That's the mental model to keep.

54
00:02:40,480 --> 00:02:43,120
A Power Apps screen doesn't have a grid full of cells.

55
00:02:43,120 --> 00:02:44,120
It has controls.

56
00:02:44,120 --> 00:02:46,360
A control is simply something on the screen.

57
00:02:46,360 --> 00:02:51,080
A text box where a person types, a label that displays information, a button, a drop-down

58
00:02:51,080 --> 00:02:54,280
list, an image, or a gallery that shows a list of records.

59
00:02:54,280 --> 00:02:55,600
Each control has properties.

60
00:02:55,600 --> 00:02:59,200
A property is a setting that describes how that control looks or behaves.

61
00:02:59,200 --> 00:03:00,640
A label has a text property.

62
00:03:00,640 --> 00:03:04,280
A button has a text property, too, along with properties like visible and color.

63
00:03:04,280 --> 00:03:06,400
The property is where PowerFX comes in.

64
00:03:06,400 --> 00:03:10,200
Instead of putting a formula in cell d2, you put a formula into the text property of

65
00:03:10,200 --> 00:03:11,200
a label.

66
00:03:11,200 --> 00:03:12,840
Imagine you're building a simple time sheet app.

67
00:03:12,840 --> 00:03:15,880
You add one input box for hours and another for the hourly rate.

68
00:03:15,880 --> 00:03:18,320
When you add a label called total pay.

69
00:03:18,320 --> 00:03:22,280
Rather than typing a fixed number into that label, you give its text property a formula

70
00:03:22,280 --> 00:03:26,320
that uses the value from the hours input and the value from the rate input.

71
00:03:26,320 --> 00:03:28,200
The label becomes your calculated cell.

72
00:03:28,200 --> 00:03:31,400
A person changes the hours from 5 to 8 and the total changes.

73
00:03:31,400 --> 00:03:33,480
They change the rate and the total changes again.

74
00:03:33,480 --> 00:03:36,120
Nobody needs to press a calculate button just to refresh the label.

75
00:03:36,120 --> 00:03:39,000
The formula keeps the label tied to the values it depends on.

76
00:03:39,000 --> 00:03:41,240
Much like Excel keeps one cell tied to another.

77
00:03:41,240 --> 00:03:44,320
That automatic response is a big part of how PowerFX feels.

78
00:03:44,320 --> 00:03:48,080
You describe the result you want and Power Apps keeps the result up to date while the person

79
00:03:48,080 --> 00:03:49,080
uses the app.

80
00:03:49,080 --> 00:03:51,840
There's one change that catches many Excel users at first.

81
00:03:51,840 --> 00:03:55,200
In a spreadsheet, you often point to a cell address like b2 or c2.

82
00:03:55,200 --> 00:03:57,680
In PowerFX, you usually point to things by name.

83
00:03:57,680 --> 00:03:59,720
An input control in one of its properties?

84
00:03:59,720 --> 00:04:02,120
A record from a list or a column in a table.

85
00:04:02,120 --> 00:04:04,920
So the question shifts from which cell holds this number?

86
00:04:04,920 --> 00:04:08,320
To which control record or column holds this information?

87
00:04:08,320 --> 00:04:10,800
That sounds small, but it changes how you look at the screen.

88
00:04:10,800 --> 00:04:14,120
You stop seeing a screen as a picture made from separate pieces and start seeing it as

89
00:04:14,120 --> 00:04:15,560
a set of connected values.

90
00:04:15,560 --> 00:04:17,240
The hours input provides one value.

91
00:04:17,240 --> 00:04:18,720
The rate input provides another.

92
00:04:18,720 --> 00:04:21,880
The total pay label reads both values and displays the result.

93
00:04:21,880 --> 00:04:26,160
Later, the same idea can control whether a warning appears, what color an amount uses,

94
00:04:26,160 --> 00:04:27,800
or what text a person sees.

95
00:04:27,800 --> 00:04:29,280
For now, keep it simple.

96
00:04:29,280 --> 00:04:32,000
Start with formulas that describe what a screen should show.

97
00:04:32,000 --> 00:04:35,800
Choose one label, pick one value a person can enter, and then make the label respond to

98
00:04:35,800 --> 00:04:36,800
it.

99
00:04:36,800 --> 00:04:40,840
That first small connection is where PowerFX starts to feel less like coding and more

100
00:04:40,840 --> 00:04:43,560
like building with formulas you already know.

101
00:04:43,560 --> 00:04:48,160
Applications are useful, but an app also needs to respond when someone clicks something.

102
00:04:48,160 --> 00:04:51,880
Building block two, properties turn formulas into app behavior.

103
00:04:51,880 --> 00:04:52,880
Here's the thing.

104
00:04:52,880 --> 00:04:57,040
A calculation tells you what a value should be, but an app also has to react when a person

105
00:04:57,040 --> 00:04:58,040
does something.

106
00:04:58,040 --> 00:05:01,040
A button without logic is just a shape with a label.

107
00:05:01,040 --> 00:05:05,120
It might say submit request, but until you give it a rule, pressing it does nothing.

108
00:05:05,120 --> 00:05:07,360
That's where app properties become more interesting.

109
00:05:07,360 --> 00:05:10,120
Every control in Power Apps has settings that PowerFX can work with.

110
00:05:10,120 --> 00:05:13,740
Some describe what the control looks like right now, while others run an action after something

111
00:05:13,740 --> 00:05:15,640
happens, two different jobs.

112
00:05:15,640 --> 00:05:17,000
The first job is ongoing.

113
00:05:17,000 --> 00:05:20,600
A formula keeps describing the current state of a control.

114
00:05:20,600 --> 00:05:22,240
Take a label that shows a total.

115
00:05:22,240 --> 00:05:27,000
Its text property keeps calculating as a user changes numbers, or take an approval button.

116
00:05:27,000 --> 00:05:29,560
Its visible property checks the request status.

117
00:05:29,560 --> 00:05:32,320
If it's ready, the button appears, if not, it stays hidden.

118
00:05:32,320 --> 00:05:35,600
You aren't telling the app to check once and forget it, you're telling it what the button's

119
00:05:35,600 --> 00:05:38,320
visibility should be whenever the screen updates.

120
00:05:38,320 --> 00:05:40,760
For example, a simple rule might look like this.

121
00:05:40,760 --> 00:05:44,520
If requests status are ready for approval, true, false.

122
00:05:44,520 --> 00:05:48,880
In plain English, that means if the status says ready for approval, show the button.

123
00:05:48,880 --> 00:05:50,440
Otherwise, hide it.

124
00:05:50,440 --> 00:05:52,760
PowerFX can also change what the button says.

125
00:05:52,760 --> 00:05:56,940
Maybe the text property reads send for approval, while a request is being prepared, but once

126
00:05:56,940 --> 00:06:01,120
it's sent, the same button could display requests submitted or disappear entirely.

127
00:06:01,120 --> 00:06:02,120
Color works the same way.

128
00:06:02,120 --> 00:06:06,520
An amount turns red when it exceeds a budget, or a status label changes color when a request

129
00:06:06,520 --> 00:06:07,600
needs attention.

130
00:06:07,600 --> 00:06:11,800
The screen responds to the information instead of showing the same fixed design to everyone.

131
00:06:11,800 --> 00:06:15,080
That's one side of PowerFX, formulas that keep a control up to date.

132
00:06:15,080 --> 00:06:17,160
The other side starts when a person acts.

133
00:06:17,160 --> 00:06:20,280
In Power Apps, a button has a property called on select.

134
00:06:20,280 --> 00:06:24,200
Sounds technical, but it simply means what should happen when someone selects this button?

135
00:06:24,200 --> 00:06:25,880
Suppose you have a simple request form.

136
00:06:25,880 --> 00:06:29,240
A user fills in the details and presses a button called send request.

137
00:06:29,240 --> 00:06:33,360
You might set that button on select property to notify request send.

138
00:06:33,360 --> 00:06:37,940
In pressed, Power Apps shows a message on screen, giving the user immediate feedback, no

139
00:06:37,940 --> 00:06:39,340
guessing whether it worked.

140
00:06:39,340 --> 00:06:42,340
You can also use on select to move someone to another screen.

141
00:06:42,340 --> 00:06:45,480
Imagine an expense app with a list of existing expenses.

142
00:06:45,480 --> 00:06:49,080
At the top, a new expense button uses navigate new expense screen.

143
00:06:49,080 --> 00:06:53,000
Press it, and Power Apps opens the screen for entering a new expense.

144
00:06:53,000 --> 00:06:55,200
That's app behavior in a very direct form.

145
00:06:55,200 --> 00:06:57,800
A user chooses an action and PowerFX response.

146
00:06:57,800 --> 00:06:59,200
The difference is worth remembering.

147
00:06:59,200 --> 00:07:03,280
A text, visible, or color formula describes what something should be, while an on select

148
00:07:03,280 --> 00:07:05,640
formula runs because a person clicked or tapped.

149
00:07:05,640 --> 00:07:08,240
Both sit in properties, but they solve different problems.

150
00:07:08,240 --> 00:07:09,560
This is where beginners get stuck.

151
00:07:09,560 --> 00:07:12,640
They learn a function like if or notify, then wonder where to put it.

152
00:07:12,640 --> 00:07:14,640
Start from the outcome, not the function name.

153
00:07:14,640 --> 00:07:16,240
Do you want a label to change?

154
00:07:16,240 --> 00:07:17,720
Select the label and work with text.

155
00:07:17,720 --> 00:07:20,320
Do you want a button to appear only in one situation?

156
00:07:20,320 --> 00:07:22,360
Select the button and work with visible.

157
00:07:22,360 --> 00:07:24,280
Do you want something to happen after a click?

158
00:07:24,280 --> 00:07:25,760
Select the button and work with on select.

159
00:07:25,760 --> 00:07:28,000
One control, one property, one clear outcome.

160
00:07:28,000 --> 00:07:29,640
That's a much easier way to build.

161
00:07:29,640 --> 00:07:33,240
Once an app starts reacting to a person's choices, the next question is obvious.

162
00:07:33,240 --> 00:07:35,600
Where does all that information live?

163
00:07:35,600 --> 00:07:36,880
Building block three.

164
00:07:36,880 --> 00:07:38,960
PowerFX works with business data.

165
00:07:38,960 --> 00:07:43,720
A screen can calculate a total, show a message, and move someone to another page.

166
00:07:43,720 --> 00:07:48,120
But most business apps need to work with information that exists beyond that one screen.

167
00:07:48,120 --> 00:07:49,360
Think about an expense app.

168
00:07:49,360 --> 00:07:51,640
The expenses need to live somewhere after submission.

169
00:07:51,640 --> 00:07:55,000
A manager opens the app tomorrow and sees the same requests.

170
00:07:55,000 --> 00:07:57,800
Finance reviews the amount category, date, and employee name.

171
00:07:57,800 --> 00:07:58,800
That's where data comes in.

172
00:07:58,800 --> 00:08:00,960
Think of your data source as a filing cabinet.

173
00:08:00,960 --> 00:08:02,880
Inside, tables are the drawers.

174
00:08:02,880 --> 00:08:06,600
When an expense table is one drawer, an employee's table another.

175
00:08:06,600 --> 00:08:11,120
Each record is a folder inside a drawer and each column is a label on that folder.

176
00:08:11,120 --> 00:08:15,960
One expense record might include the employee name, date, category, amount, and approval status.

177
00:08:15,960 --> 00:08:20,640
PowerFX helps your app read from that filing cabinet, find the folders it needs, and sometimes

178
00:08:20,640 --> 00:08:22,640
add or update information.

179
00:08:22,640 --> 00:08:25,240
Before we look at formulas, keep three words straight.

180
00:08:25,240 --> 00:08:27,480
A table is a group of related records.

181
00:08:27,480 --> 00:08:29,560
A record is one item in that table.

182
00:08:29,560 --> 00:08:33,680
And a column is one type of information stored for every record.

183
00:08:33,680 --> 00:08:37,840
So in an expenses table, one record could be a train ticket with amount 42.50, category,

184
00:08:37,840 --> 00:08:39,320
travel, and status submitted.

185
00:08:39,320 --> 00:08:42,040
An app doesn't always need to show every folder in the drawer.

186
00:08:42,040 --> 00:08:46,040
Imagine an employee opens the expense app and wants to see only their own claims, while

187
00:08:46,040 --> 00:08:50,920
a manager wants only claims waiting for approval and finance wants only travel expenses.

188
00:08:50,920 --> 00:08:51,920
That's the job of filter.

189
00:08:51,920 --> 00:08:55,760
A filter formula asks for a smaller set of records that match a rule.

190
00:08:55,760 --> 00:08:58,040
In plain English, you might tell the app.

191
00:08:58,040 --> 00:09:02,760
Show expenses where the employee name matches the current user or show only records where

192
00:09:02,760 --> 00:09:05,120
category equals travel.

193
00:09:05,120 --> 00:09:06,640
The result appears in a gallery.

194
00:09:06,640 --> 00:09:09,440
The power apps control the display is a repeating list.

195
00:09:09,440 --> 00:09:12,960
Instead of building separate screens for every category, you give one gallery a formula

196
00:09:12,960 --> 00:09:14,760
that responds to the user's choice.

197
00:09:14,760 --> 00:09:17,120
Choose travel and the gallery shows travel.

198
00:09:17,120 --> 00:09:19,200
Choose equipment and the list changes.

199
00:09:19,200 --> 00:09:21,520
The records in the filing cabinet haven't disappeared.

200
00:09:21,520 --> 00:09:24,720
The app simply selected the folders the person needs right now.

201
00:09:24,720 --> 00:09:26,600
What if the list is correct but in the wrong order?

202
00:09:26,600 --> 00:09:27,960
That's where sort comes in.

203
00:09:27,960 --> 00:09:32,140
A busy manager wants the newest requests at the top, while finance needs the highest amounts

204
00:09:32,140 --> 00:09:33,140
first.

205
00:09:33,140 --> 00:09:35,640
Sort lets you arrange records before displaying them.

206
00:09:35,640 --> 00:09:38,040
Filter answers which records should I see?

207
00:09:38,040 --> 00:09:39,640
Sort answers in what order?

208
00:09:39,640 --> 00:09:43,920
Often you use both together, for example filter for pending approval requests, then sort

209
00:09:43,920 --> 00:09:45,680
by date so the newest appear first.

210
00:09:45,680 --> 00:09:46,960
There's another common need.

211
00:09:46,960 --> 00:09:48,320
Sometimes you don't need a whole list.

212
00:09:48,320 --> 00:09:49,920
You need one matching record.

213
00:09:49,920 --> 00:09:52,680
Maybe an expense claim needs to check an employee's approval limit.

214
00:09:52,680 --> 00:09:56,480
The app looks in an employee's table, finds that person's record and reads the limit.

215
00:09:56,480 --> 00:09:57,760
That's the pattern behind lookup.

216
00:09:57,760 --> 00:10:00,400
Lookup finds one record that matches the rule you give it.

217
00:10:00,400 --> 00:10:03,640
You can think of it as asking someone at the filing cabinet, please find the folder for

218
00:10:03,640 --> 00:10:04,640
this employee.

219
00:10:04,640 --> 00:10:07,720
Once you have that folder, you can read the information inside it.

220
00:10:07,720 --> 00:10:09,520
Reading data is only half the job.

221
00:10:09,520 --> 00:10:10,800
Apps also collect information.

222
00:10:10,800 --> 00:10:14,600
A person enters a new expense, a manager changes the status to approve, someone corrects

223
00:10:14,600 --> 00:10:17,720
the category, power effects can add or update those records.

224
00:10:17,720 --> 00:10:19,520
Still, this is where you need to slow down.

225
00:10:19,520 --> 00:10:24,360
The app may show a button, but the data source controls who can read, add or change information.

226
00:10:24,360 --> 00:10:28,240
An expense app shouldn't give every user the same access just because they can open a screen.

227
00:10:28,240 --> 00:10:29,480
Your data permissions matter.

228
00:10:29,480 --> 00:10:33,600
Power apps can connect to places where many companies already keep information, SharePoint,

229
00:10:33,600 --> 00:10:35,600
Excel, SQL, Dataverse.

230
00:10:35,600 --> 00:10:39,120
Those sources don't all work the same way, and the right choice depends on your app's

231
00:10:39,120 --> 00:10:40,120
needs.

232
00:10:40,120 --> 00:10:41,640
But for a beginner, the point is simpler.

233
00:10:41,640 --> 00:10:45,000
Your formulas and your data structure belong in the same conversation.

234
00:10:45,000 --> 00:10:48,920
If the table has unclear columns, the formula becomes harder to write.

235
00:10:48,920 --> 00:10:52,720
If the formula asks unclear questions, the app returns confusing results.

236
00:10:52,720 --> 00:10:57,440
Name your columns clearly, know which record you need, then write the formula that finds,

237
00:10:57,440 --> 00:11:00,400
filters, sorts, or updates that information.

238
00:11:00,400 --> 00:11:04,360
Reading and changing records handles a lot of app work, but rules can become difficult

239
00:11:04,360 --> 00:11:08,800
to manage when the same answer needs to appear in more than one place.

240
00:11:08,800 --> 00:11:10,400
Building block 4.

241
00:11:10,400 --> 00:11:12,760
Variables, collections, and reusable rules.

242
00:11:12,760 --> 00:11:16,160
So once your app has more than one screen, it needs a way to remember small things while

243
00:11:16,160 --> 00:11:17,680
someone moves around.

244
00:11:17,680 --> 00:11:19,880
Imagine someone selects an expense from a list.

245
00:11:19,880 --> 00:11:24,000
They open a detail screen, but that second screen needs to know which expense they selected,

246
00:11:24,000 --> 00:11:25,880
even though the list sits on a different screen.

247
00:11:25,880 --> 00:11:27,320
That's where a variable comes in.

248
00:11:27,320 --> 00:11:29,480
Think of a variable as a labeled box inside the app.

249
00:11:29,480 --> 00:11:33,440
You put a value in, give it a clear name, and then use that value somewhere else while

250
00:11:33,440 --> 00:11:34,520
the app runs.

251
00:11:34,520 --> 00:11:38,560
The value could be a selected expense of persons chosen category, or a running total for items

252
00:11:38,560 --> 00:11:39,840
they've added to a request.

253
00:11:39,840 --> 00:11:42,480
For instance, a user selects an expense in a gallery.

254
00:11:42,480 --> 00:11:46,040
The app saves that record in a variable and moves to a detail screen.

255
00:11:46,040 --> 00:11:49,400
On that next screen, the labels read the selected expense from the variable and show the

256
00:11:49,400 --> 00:11:51,520
amount, date, category, and status.

257
00:11:51,520 --> 00:11:55,280
The user sees one smooth journey, but behind the scenes the app remembered their choice.

258
00:11:55,280 --> 00:11:58,200
Now variables are helpful, but they aren't permanent storage.

259
00:11:58,200 --> 00:12:01,880
If you need an expense record to be available tomorrow for finance or a manager, it belongs

260
00:12:01,880 --> 00:12:03,600
in your connected data source.

261
00:12:03,600 --> 00:12:07,600
A variable only helps the app keep track of something while the session is running.

262
00:12:07,600 --> 00:12:09,760
Knowing the difference saves a lot of confusion.

263
00:12:09,760 --> 00:12:14,440
One box holds one value, but sometimes your app needs to remember a small list of values.

264
00:12:14,440 --> 00:12:15,600
That's where collections come in.

265
00:12:15,600 --> 00:12:18,200
A collection is like a temporary table inside the app.

266
00:12:18,200 --> 00:12:20,760
It can hold several records while the user works through a task.

267
00:12:20,760 --> 00:12:23,240
A simple shopping cart is an easy example.

268
00:12:23,240 --> 00:12:25,600
A person selects three items from a product list.

269
00:12:25,600 --> 00:12:30,040
The app adds them to a collection and the cart screen shows the selected items, calculates

270
00:12:30,040 --> 00:12:34,360
the total, and lets the user remove one before submitting the order.

271
00:12:34,360 --> 00:12:36,280
You could use the same idea for a safety checklist.

272
00:12:36,280 --> 00:12:40,440
A field worker marks several checks as complete and the app keeps those choices in a collection

273
00:12:40,440 --> 00:12:42,120
while they work through the form.

274
00:12:42,120 --> 00:12:46,320
When they finish, the app saves the completed result to the proper data source.

275
00:12:46,320 --> 00:12:49,280
Customs are useful for short term work, but they aren't a replacement for the source where

276
00:12:49,280 --> 00:12:50,840
your business records belong.

277
00:12:50,840 --> 00:12:53,800
That matters when you're building something people will rely on.

278
00:12:53,800 --> 00:12:57,560
If a collection holds the only copy of an important request, you've created a problem,

279
00:12:57,560 --> 00:13:01,320
the user might close the app, lose their connection, or start again later, and that temporary

280
00:13:01,320 --> 00:13:02,560
list might be gone.

281
00:13:02,560 --> 00:13:06,960
So, use collections when the app needs a working list and use your data source when the business

282
00:13:06,960 --> 00:13:08,480
needs a lasting record.

283
00:13:08,480 --> 00:13:11,920
As your app grows another challenge appears, the same business rule starts showing up in

284
00:13:11,920 --> 00:13:13,480
more than one place.

285
00:13:13,480 --> 00:13:16,920
Maybe an order receives free delivery only when the total reaches a certain amount and

286
00:13:16,920 --> 00:13:18,640
a discount code is still valid.

287
00:13:18,640 --> 00:13:22,560
You might need that answer on the checkout screen, the order review screen, and later in an

288
00:13:22,560 --> 00:13:24,120
automated process.

289
00:13:24,120 --> 00:13:27,640
Copying the same long formula into each place feels quick at first, but then the delivery

290
00:13:27,640 --> 00:13:28,640
rule changes.

291
00:13:28,640 --> 00:13:32,400
Someone updates one copy and misses the other two, and now different parts of the same

292
00:13:32,400 --> 00:13:34,440
solution give different answers.

293
00:13:34,440 --> 00:13:37,040
Reusable PowerFX functions help you avoid that mess.

294
00:13:37,040 --> 00:13:40,960
You define a function once, give it the inputs it needs, and it returns an answer.

295
00:13:40,960 --> 00:13:44,440
For the delivery example, the function receives an order subtotal and checks whether the

296
00:13:44,440 --> 00:13:46,600
discount code meets the date rule.

297
00:13:46,600 --> 00:13:48,520
Its result is either true or false.

298
00:13:48,520 --> 00:13:51,680
True means free delivery applies, false means it doesn't.

299
00:13:51,680 --> 00:13:54,280
The app doesn't need to carry the entire rule everywhere.

300
00:13:54,280 --> 00:13:56,960
It can ask the shared function for the answer.

301
00:13:56,960 --> 00:14:00,600
That makes the rule easier to check, easier to change, and easier to keep consistent.

302
00:14:00,600 --> 00:14:03,960
PowerFX appears most clearly in canvas apps where you work directly with controls in the

303
00:14:03,960 --> 00:14:08,280
formula bar, but the same formula language also appears in data versus other power platform

304
00:14:08,280 --> 00:14:09,280
experiences.

305
00:14:09,280 --> 00:14:12,080
You don't need to master every place it appears before you start.

306
00:14:12,080 --> 00:14:15,800
Just understand the direction Microsoft is taking because the same way of writing business

307
00:14:15,800 --> 00:14:18,200
rules can travel beyond one screen in one app.

308
00:14:18,200 --> 00:14:20,520
For you, the practical lesson is simple.

309
00:14:20,520 --> 00:14:24,360
When a value only matters during a person's journey through the app, use a variable or a

310
00:14:24,360 --> 00:14:26,160
collection with a clear purpose.

311
00:14:26,160 --> 00:14:29,840
When the same business rule needs to return the same answer in more than one place, keep

312
00:14:29,840 --> 00:14:31,760
that rule together instead of copying it.

313
00:14:31,760 --> 00:14:35,080
All of these pieces can sound separate when you first meet them, but they make more

314
00:14:35,080 --> 00:14:38,240
sense when you watch them work together in one small app.

315
00:14:38,240 --> 00:14:40,720
While the parts connect, one formula system.

316
00:14:40,720 --> 00:14:43,920
Let's walk through a simple expense approval app from start to finish.

317
00:14:43,920 --> 00:14:46,680
An employee opens the app and starts a new expense claim.

318
00:14:46,680 --> 00:14:50,680
They enter an amount, choose a category, add a date, and write a short description.

319
00:14:50,680 --> 00:14:53,000
Each input control now contains a value.

320
00:14:53,000 --> 00:14:55,280
PowerFX can use those values straight away.

321
00:14:55,280 --> 00:14:59,280
A label can calculate a total, a formula can check whether the amount is above the employee's

322
00:14:59,280 --> 00:15:03,360
normal limit, and another formula can show a message if the description is blank.

323
00:15:03,360 --> 00:15:07,480
The screen changes as the employee fills in the form, then they press submit.

324
00:15:07,480 --> 00:15:11,640
That button's action formula saves the request and moves the person to a confirmation screen.

325
00:15:11,640 --> 00:15:14,880
The app stores the newly selected record in a variable so the confirmation screen knows

326
00:15:14,880 --> 00:15:16,520
exactly which claim to display.

327
00:15:16,520 --> 00:15:20,840
At the same time, the app writes the lasting information to the connected data source.

328
00:15:20,840 --> 00:15:23,320
Later, a manager opens their approval screen.

329
00:15:23,320 --> 00:15:25,840
The gallery doesn't need to show every expense in the company.

330
00:15:25,840 --> 00:15:29,520
The formula can return only the records waiting for that manager, and another formula can

331
00:15:29,520 --> 00:15:32,880
arrange those records by date or amount depending on what the team needs.

332
00:15:32,880 --> 00:15:34,360
The manager selects one record.

333
00:15:34,360 --> 00:15:37,920
The detail screen reads that choice shows the full request and checks the relevant approval

334
00:15:37,920 --> 00:15:38,920
rule.

335
00:15:38,920 --> 00:15:41,720
If the amount sits within the limit, the approval action appears.

336
00:15:41,720 --> 00:15:45,640
If the request needs more detail, the app shows a different message or sends the manager

337
00:15:45,640 --> 00:15:48,040
back to the employee for more information.

338
00:15:48,040 --> 00:15:49,600
One business rule may also be shared.

339
00:15:49,600 --> 00:15:53,280
A delivery rule, spending rule, or discount rule can live in a reusable function so the app

340
00:15:53,280 --> 00:15:55,920
doesn't create a new version of the answer on every screen.

341
00:15:55,920 --> 00:15:57,440
This is the part that usually clicks.

342
00:15:57,440 --> 00:16:00,920
PowerFX doesn't sit next to your app like a separate pile of code.

343
00:16:00,920 --> 00:16:03,240
It supplies the rules inside the app itself.

344
00:16:03,240 --> 00:16:07,240
The controls use formulas to display the right information, buttons use formulas to respond

345
00:16:07,240 --> 00:16:11,760
to people, and data formulas select and update the records the app needs.

346
00:16:11,760 --> 00:16:15,700
Variables and collections hold short term context, while shared functions keep repeated

347
00:16:15,700 --> 00:16:16,700
rules consistent.

348
00:16:16,700 --> 00:16:20,640
Older app projects often split these jobs across separate scripts, hand-built pages, and

349
00:16:20,640 --> 00:16:24,480
custom logic written far away from the screen where people use it.

350
00:16:24,480 --> 00:16:29,240
PowerFX keeps much of the logic close to the control, screen, or data, step-it-effects.

351
00:16:29,240 --> 00:16:33,680
It can make a small business app easier to read, especially when you name things clearly.

352
00:16:33,680 --> 00:16:38,880
Still, PowerFX isn't a promise that every app problems days simple, large data needs,

353
00:16:38,880 --> 00:16:43,240
strict security rules, complex database changes, and work that connects many systems may

354
00:16:43,240 --> 00:16:47,600
need help from experienced developers, data teams, or other power platform tools.

355
00:16:47,600 --> 00:16:51,720
That's not a failure of low-code, it's simply choosing the right tool for the job.

356
00:16:51,720 --> 00:16:55,560
For your first practice session, don't try to build the entire expense system.

357
00:16:55,560 --> 00:16:58,400
Build one small screen, then give it one useful rule.

358
00:16:58,400 --> 00:16:59,960
Here's a simple approach.

359
00:16:59,960 --> 00:17:04,280
Grab one blank canvas app and one safe idea, like a simple request form.

360
00:17:04,280 --> 00:17:08,440
First, make one label respond to an input, then add an if rule that changes what the user

361
00:17:08,440 --> 00:17:12,120
sees, and finally give a button in action with notify or navigate.

362
00:17:12,120 --> 00:17:14,120
Don't try to memorize every function.

363
00:17:14,120 --> 00:17:18,680
Instead, use the formula bar suggestions and read the hints for each input the function

364
00:17:18,680 --> 00:17:19,680
needs.

365
00:17:19,680 --> 00:17:23,320
Clear names also help, so name controls, screens, variables, and data columns, so you can

366
00:17:23,320 --> 00:17:24,720
tell what they do later.

367
00:17:24,720 --> 00:17:27,320
Build one small screen and test it after every change.

368
00:17:27,320 --> 00:17:31,400
And remember, you don't need to build everything at once, just take it one step at a time.

369
00:17:31,400 --> 00:17:34,000
PowerFex brings that spreadsheet mindset into app building.

370
00:17:34,000 --> 00:17:38,280
It covers everything from what users see to what buttons do and how records move.

371
00:17:38,280 --> 00:17:39,560
So here's the key.

372
00:17:39,560 --> 00:17:43,920
Start with one property and one formula, and that's where AppLogic stops feeling mysterious.

373
00:17:43,920 --> 00:17:49,400
If you want more Microsoft, knowledge nuggets in plain English, subscribe to M365FM.

374
00:17:49,400 --> 00:17:51,840
And share this episode with someone moving from Excel into PowerApps.

