15. What is the formula in power apps and why it’s important?

A formula in Power Apps is a set of functions, written using Power Fx, the low-code language. Formula is used to define logic, behavior and activity of your app. This is similar to formula which is used in the excel.

Why is it Important?
Formulas help your app work properly. They tell it how to:

  •  Show data
  •  Filter data
  •  Move between screens
  •  Show messages and much more.
  •  How user will interact with the app.

Let’s have some examples.

Use CaseExample FormulaExplanation
Display a user’s nameUser().FullNameShows the full name for logged In user.
Submit a formSubmitForm(EditForm1)Saves data which is present in EdotitForm1  to a connected data source
Filter a gallery by nameFilter(Employees, StartsWith(Name, txtSearch.Text))Filters employee list based on user input
Show a success messageNotify(“Saved successfully!”, NotificationType.Success)Shows a pop-up message after an action
Navigate between screensNavigate(Screen2, ScreenTransition.Fade)Moves the user to another screen
Scroll to Top