Power Apps For Beginners

Getting started with Power Apps Guide.

Common Expressions to Know First

Problem Expression
Show the current logged in user

The User Function Examples

User().Email - Shows email address
User().FullName - Shows user's name
User().Image - Shows user's photo
Filter the rows to a certain criteria

The Filter expression can filter the rows based on an expression of your choosing.

Filter(DataSource, Expresssion)
Filter( DataSourceName, Column > 0 )
Filter( DataSourceName, Column > 0, Column2 = "Value" )
Lookup a value in another table or source

The lookup function can see the value from a different source based on an expression.

Lookup(Source, Condition, ValueToShow)
Lookup(DataSourceName, CustomerID = 5, CustomerName)

Create a Global Variable

Global variables can be seen on any screen. They can be created when you start an app by selecting the App OnStart event or on any actionable event.

Set(VariableName, value)
Navigate to a new screen

Navigation can be done two ways: either go back to the previous screen you cam from or navigate to a specific screen..


Optionally, you can specify an effect during the transition:

Navigate(ScreenName, ScreenTransition.Fade)
Send data from a form to the source.

A few ways to send data from a form are SubmitForm or the Patch commands. The SubmitForm is easiest with he smallest amount of flexibility.

Searching multiple columns for a row

The Search command does a contains search across multiple columns and is usually used in galleries or data tables.

Search(DataSource, SearchString, Column1 [, Column2, ... ] )
Search(DataSource, txtInput.Text, "FirstName", "LastName") 
Updating or inserting data without a form

The Patch function is one way to update or insert data without using a form. For example, you can tie it to an OnChange even of a drop down box.

For inserting a record:
Patch(DataSource, Defaults(DataSource), {ColumnName:"Value1", ColumnName2:Number2})

Similarly, you can update data when you select an item in a gallery:
Patch(DataSource, ThisItem, {ColumnName:"Value1", ColumnName2:Number2})