0% found this document useful (0 votes)
932 views2,262 pages

MS PowerApps

This document provides an overview and summary of the PowerApps platform and capabilities for both canvas apps and model-driven apps. It covers topics such as getting started, creating apps from templates or from scratch, connecting to and working with data, designing interfaces, adding business logic, publishing and managing apps, and transitioning existing apps to the Unified Interface.

Uploaded by

Bình Hồ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
932 views2,262 pages

MS PowerApps

This document provides an overview and summary of the PowerApps platform and capabilities for both canvas apps and model-driven apps. It covers topics such as getting started, creating apps from templates or from scratch, connecting to and working with data, designing interfaces, adding business logic, publishing and managing apps, and transitioning existing apps to the Unified Interface.

Uploaded by

Bình Hồ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2262

Contents

Get started: What is PowerApps?


Sign up for 30-day trial version
Sign up for Community Plan
What's new
Find and run apps
In a browser
On a phone (canvas)
On a phone (model-driven)
On a SharePoint Online page (canvas)
In Microsoft Teams (canvas)
From AppSource
Use model-driven apps
Unified Interface
Navigation and basics
View your profile
Set personal options
Use a screen reader
Keyboard shortcuts
Work with records
Create a record
Add activities to the timeline
FAQ about activities
Assign or share records
Share records using Access Team
Add a connection role
Deactivate accounts or contacts
Track your progress with dashboards and charts
Search records
Search for records
Use advanced find
Import and export data
Import data
Export data to Excel Online
Export data to Excel
Export to a dynamic worksheet
Export to a static worksheet
Export to an Excel PivotTable
Reports
Work with reports
Create a report using the Report Wizard
Add an existing report
Edit the default filter of a report
Troubleshoot reports
Automate processes
Work with business processes
Use flows
Use Dynamics 365 App for Outlook
Create apps
Overview
Sign in to PowerApps
Canvas apps
What are canvas apps?
System requirements, limits, and configuration
Keyboard shortcuts
Explore sample apps
Create a canvas app from a sample
Expense Report app
Help Desk app
Meeting Capture app
Create your first app
1 - Generate an app from data
From Common Data Service
From SharePoint
From Excel
2 - Make basic customizations
1 - Galleries
2 - Forms
3 - Cards
3 - Create an app yourself
From Common Data Service
From Excel
Create an app from a template
Design and build an app
Connect to data
List of connections
Popular connectors
Common Data Service
SharePoint
SQL Server
Dynamics 365
Office 365 Users
Office 365 Outlook
Excel
Cloud storage
Add a connection
Manage connections
Prepare Excel data
Delegation
Manage gateways
Understand gateways
Understand data sources
Understand tables and records
Understand record references
Design the interface
Add and configure controls
Add and configure a screen
Add a screen
Add a scrolling screen
Configure Office 365 screens
Calendar-screen overview
Calendar-screen reference
Email-screen overview
Email-screen reference
Meeting-screen overview
Meeting-screen reference
People-screen overview
People-screen reference
Show a table of items
Add a gallery
Add a variable-height gallery
Add and configure a form
Add a form
Understand forms
Understand form layout
Understand cards
Add a list
Add a list box, a drop-down list, or radio buttons
Create dependent drop-down lists
Add a chart
Add multimedia
Add Power BI data
Control reference
List of controls and properties
Add picture
Attachments
Audio
Barcode scanner
Button
Camera
Card
Check box
Column chart
Column
Combo box
Data table
Date picker
Display form
Drop down
Edit form
Export
Gallery
HTML text
Icon
Image
Import
Line chart
List box
Microphone
PDF viewer (experimental)
Pen input
Pie chart
Power BI tile
Radio
Rating
Rich text editor
Screen
Shape
Slider
Label
Text input
Timer
Toggle
Video
Web barcode scanner (experimental)
Configure app functionality
Get started with formulas
Understand variables
Understand behavior formulas
Show dates and times
Create a collection
Show the current user
Connect lists using lookups
Add a flow
Formula reference
Overview
Abs
Acceleration
Acos
Acot
AddColumns
And
App
Asin
AsType
Atan
Atan2
Average
Back
Blank
Calendar
Char
Choices
Clear
ClearCollect
Clock
Coalesce
Collect
Color
ColorFade
ColorValue
Compass
Concat
Concatenate
Concurrent
Connection
Count
Cos
Cot
CountA
CountIf
CountRows
Data types
DataSourceInfo
Date
DateAdd
DateDiff
DateTimeValue
DateValue
Day
Defaults
Degrees
Disable
Distinct
Download
DropColumns
EditForm
Enable
EndsWith
Errors
EncodeUrl
Exit
Exp
Filter
Find
First
FirstN
ForAll
GroupBy
GUID
HashTags
Hour
If
IfError
IsBlank
IsEmpty
IsMatch
IsNumeric
IsToday
IsType
JSON
Language
Last
LastN
Launch
Left
Len
Ln
LoadData
Location
LookUp
Lower
Match
MatchAll
Max
Mid
Min
Minute
Mod
Month
Navigate
NewForm
Not
Notify
Now
Operators
Or
Param
Patch
Pi
PlainText
Power
Proper
Radians
Rand
Refresh
Relate
Remove
RemoveIf
RenameColumns
Replace
Reset
ResetForm
Revert
RGBA
Right
Round
RoundDown
RoundUp
SaveData
Search
Second
Select
Set
SetFocus
ShowColumns
Shuffle
Sin
Sort
SortByColumns
Split
Sqrt
StartsWith
StdevP
Substitute
SubmitForm
Sum
Switch
Table
Tan
Text
Time
TimeValue
TimeZoneOffset
Today
Trim
TrimEnds
Ungroup
Unrelate
Update
UpdateContext
UpdateIf
Upper
User
Validate
Value
VarP
ViewForm
Weekday
With
Year
Create an app in a solution
Create an app with relational data
Install the data
Overview of the canvas app
1 - Create the order gallery
2 - Create the summary form
3 - Create the detail gallery
Build a global app
Make an app accessible
Create an accessible app
Find accessibility issues
Use color for accessibility
Show or hide content from assistive technologies
Announce dynamic changes with live regions
Experimental and preview features
Save and publish an app
Share an app and its dependencies
Share an app
Share Excel data
Share app resources
Embed an app in Power BI
Embed a Teams app
Manage an app
Edit an app
Delete an app
Restore a previous version
Change app name and tile
Manage screens
Change screen size and orientation
Create responsive layout
Customize a SharePoint list form
Make basic changes
Understand SharePoint forms integration
Integrate with other technologies
SharePoint Online
Overview
Set up SharePoint Online lists
Generate an app
Create a flow for approvals
Create an app from scratch
Create a Power BI report
Publish the Power BI report
Embed the Power BI report
Create a flow for alerts
Walk through the completed scenario
Cognitive Services
Transform your InfoPath forms to PowerApps
For developers
Canvas apps for enterprise developers, partners, and ISVs
Build and certify custom connectors
Integrate with websites and other technologies
Develop offline-capable apps
Let customers test drive your apps
Create a component
Overview
Behavior formulas
Embed canvas apps in your applications
Model-driven apps
Explore sample apps
Create your first app
Design and build an app
Understand model-driven app components
Define data for an app
Common field properties
Overview of special field properties
Translate localizable text
Design the interface
Use app designer to build an app
Create an app
Create a site map for an app
Add or edit app components
Add the team entity as a lookup option
Work with forms
Use the new form designer
Create or edit forms
Add, move or delete fields
Add, move or delete sections
Add, move or delete tabs
Properties in the form designer
Configure header properties
Using the tree view
Type of forms
Create or edit a main form
Create or edit quick create forms
Create a quick view form
Create a card form
Form editor overview
Form properties overview
Sub-grid properties overview
Tab properties overview
Design considerations for main forms
How main forms appear
Control access to forms
Add a field to a form
Show or hide form elements
Change navigation within a form
Add form navigation for related entities
How-to guides: Forms
How to use the main form and its components
How to open the form editor
How to add iFrames to forms
How to optimize form performance
How to work with sections in a form
How to configure Bing maps in a form
How to assign form order
How to configure event handlers in a form
How to disable auto-save in a form
Embed a canvas app on a model-driven form
Add an embedded canvas app
Edit an embedded canvas app
Customize the screen size and orientation
Perform predefined actions on the host form
ModelDrivenFormIntegration control
Share an embedded canvas app
Embedded canvas app guidelines
Migrating embedded canvas from public preview
Embed a Power BI report on a form
Work with views
Create or edit a view
Access a view definition
Create and edit views
Choose and configure columns in views
How to guides: Views
How to make grids editable
How to sort records in a view
How to edit filter criteria and sort order
How to set managed properties for views
How to Specify a default view
How to delete or deactivate a view
Apply business logic in an app
Create a business rule for a form
Apply data visualizations in an app
Create a system chart
Create or edit dashboards
Configure interactive experience dashboards
Set properties for a chart or list
Use system controls for data visualizations
Set up the Notes control
Quick view control properties
Additional controls for Dynamics 365 for phones and tablets
Timer control overview
Use custom controls for data visualizations
Use Excel and Word templates
Use themes to apply organization branding
Add reporting to your app
Validate and publish an app
Share an app
Manage an app
Manage app properties
Specify properties for Unified Interface apps
Delete an app
Advanced app making and customization
Privileges for customization
Create or edit web resources
Web resource properties
Change custom entity icons
Distribute an app using solutions
Create guided help
Transition to Unified Interface
Transition quick start
Use an existing environment to transition quick start
Unified Interface Playbook
Approaching a Unified Interface transition
Accessibility in PowerApps app designer
Customize Dynamics 365 App for Outlook
For developers
Portals (preview)
What is PowerApps Portals?
Design and build a portal
Portal templates
Create a portal
Create a Dynamics 365 Portal
Portal designer anatomy
Supported web browsers for portal designer
Create and manage webpages
Compose a page
Work with templates
Manage existing portals
Configure site settings
Advanced portal administration
Overview
Portal details
Download public key of portal
View portal error logs
Reset a portal
Change base URL of a portal
Enable maintenance mode
Set up Power BI integration
Run Portal Checker
Renew portal authentication key
Set up IP address restriction
Update to PowerApps Portals domain
Known issues
PowerApps Portals FAQ
Common Data Service
Work with entities
Create an entity
Create a custom entity that has components
Add data to an entity using Power Query
Entities and metadata
Types of entities
Create and edit entities
Edit an entity
Create and edit virtual entities
Virtual entity OData v4 data provider
Define alternate keys using PowerApps portal
Define alternate keys using solution explorer
How to guides: Entity
How to create entities using PowerApps portal
How to create entities using solution explorer
How to import or export data
How to open entity data in Excel
How to define alternate keys
How to define status reason transitions
How to delete a custom entity
How to display custom icons
How to edit system entity messages
How to configure an entity for feedback/ratings
Azure Cosmos DB SQL API Data Provider
How to work with virtual entity
Work with entity relationships
Entity relationships overview
Create one-to-many entity relationships overview
Create many-to-many entity relationships overview
Create an entity relationship
Create one-to-many entity relationships
Create one-to-many entity relationships using solution explorer
Create many-to-many entity relationships using PowerApps portal
Set managed properties for entity relationships
Visualize hierarchical data
Define and query hierarchically related data
Configure connection roles
How-to guides: Relationships
How to create many-to-many relationships using PowerApps portal
How to create many-to-many relationships using PowerApps solution explorer
How to set managed properties for relationships
How to query and visualize hierarchically related data
How to define and query hierarchically related data
How to configure connection roles
Work with fields
Types of fields
Global option sets overview
Autonumber fields
Set managed properties for fields
Behavior and format of the Date and Time field
How-to guides: Fields
How to create fields
How to manage fields
How to create fields using PowerApps portal
How to create fields using PowerApps solution explorer
How to create an option set using PowerApps portal
How to create global option sets using solution explorer
How to define calculated fields
How to define rollup fields
How to map entity fields
How to delete fields
Apply business logic
Create a business rule for an entity
Work with solutions
Use solutions
Use the Common Data Services default solution
Import, update, and export solutions
Navigate to a specific solution
Create a solution
View solution layers
View solution history
Use solution checker
Use segmented solutions
Change the solution publisher prefix
Set managed properties in metadata
Publish changes
License requirements for entities
Complex entities and licensing
Restricted entities requiring Dynamics 365 licenses
SharePoint, OneNote, and OneDrive integration
Create a Power BI report
Translate customized entity and field text
Import translated entity and field text into an app
Security in Common Data Service
For developers
AI Builder
Use AI Builder in PowerApps
Learn from others
Webinars
Blog
Forums
Troubleshoot
Performance tips for canvas apps
Common issues and resolutions
Get a session or app ID
Troubleshoot Power Query
Support
What is PowerApps?
7/18/2019 • 2 minutes to read • Edit Online

PowerApps is a suite of apps, services, connectors and data platform that provides a rapid application development
environment to build custom apps for your business needs. Using PowerApps, you can quickly build custom
business apps that connect to your business data stored either in the underlying data platform (Common Data
Service) or in various online and on-premises data sources (SharePoint, Excel, Office 365, Dynamics 365, SQL
Server, and so on).
Apps built using PowerApps provide rich business logic and workflow capabilities to transform your manual
business processes to digital, automated processes. Further, apps built using PowerApps have a responsive design,
and can run seamlessly in browser or on mobile devices (phone or tablet). PowerApps "democratizes" the custom
business app building experience by enabling users to build feature-rich, custom business apps without writing
code.
PowerApps also provides an extensible platform that lets pro developers programmatically interact with data and
metadata, apply business logic, create custom connectors, and integrate with external data.
For more information, see the PowerApps channel on YouTube.

PowerApps for app makers/creators


Using PowerApps, you can create three types of apps: canvas, model-driven, and portal. More information:
Overview of creating apps in PowerApps.
To create an app, you start with web.powerapps.com.
PowerApps Studio is the app designer used for building canvas apps. The app designer makes creating
apps feel more like building a slide deck in Microsoft PowerPoint. More information: Generate an app from
data
App designer for model-driven apps lets you define the sitemap and add components to build a model-
driven app. More information: Design model-driven apps using app designer

PowerApps for app users


You can run apps that you created, or that someone else created and shared with you, in browser or on mobile
devices (phone or tablet). More information: Find and run apps

PowerApps for admins


PowerApps admins can use:
PowerApps admin center (admin.powerapps.com) to create and manage environments, users, roles, and
data-loss prevention policies.
Power Platform admin center (admin.powerplatform.microsoft.com) to manage environments, get real-
time, self-help recommendations and support for Dynamics 365 for Customer Engagement apps,
PowerApps, and Microsoft Flow, and view Common Data Service analytics.
More information: Administer PowerApps
PowerApps for developers
Developers are app makers who can write code to extend business app creation and customization. Developers can
use code to create data and metadata, apply server-side logic using Azure functions, plug-ins, and workflow
extensions, apply client-side logic using JavaScript, integrate with external data using virtual entities and webhooks,
build custom connectors, and embed apps into your website experiences to create integrated solutions. More
information: PowerApps for developers

PowerApps and Dynamics 365


Dynamics 365 applications, like Dynamics 365 for Sales, Dynamics 365 for Service, Dynamics 365 for Marketing
also use the underlying data platform (Common Data Service) used by PowerApps to store and secure data. This
enables you to build apps using PowerApps and Common Data Service directly against your core business data
already used within Dynamics 365 without the need for integration. More information: Dynamics 365 and the
Common Data Service

Try PowerApps for free


You can try PowerApps for free by signing up either for a 30 day trial or community plan.
Explore PowerApps for free for 30 days
3/22/2019 • 4 minutes to read • Edit Online

You can explore all PowerApps capabilities for free by signing up for a PowerApps Plan 2 license that expires
after 30 days. If you don't have any license for PowerApps, the trial plan provides temporary access to these
and other features:
Extend the capabilities of Office 365 (SharePoint Online, Teams, Excel and more).
Create and run canvas apps that connect to Common Data Service and a wide range of more than 200 other
data sources, including premium connectors and on-premises data.
Create and run model-driven apps.
Create automated workflows with Microsoft Flow.
Create and manage environments and Common Data Service databases.
If you have a PowerApps Plan 1 license or a license through Office 365, you already have access to some of
these features; the trial license temporarily expands your access to include all features in the previous list. To
find out what capabilities each type of license offers, see the pricing page.

NOTE
If you're an administrator, see Purchase PowerApps for your organization or PowerApps in your organization Q&A.

Identify your current license


To find out which license or licenses you already have, try to sign in to PowerApps with your work or school
credentials.
If you can't sign in, you don't have any PowerApps licenses, and you'll need to start a trial if you want any
access to PowerApps.

IMPORTANT
You can't sign in by using a personal email address, such as one that ends in outlook.com, hotmail.com, or
gmail.com. For more information, see What email address can I use? later in this topic.

If you can sign in, select the gear icon near the upper-right corner, and then select Plans.

Upgrade an existing license


To start a free, 30-day trial of PowerApps Plan 2 from an existing license, sign in to PowerApps, and then try
any feature that requires Plan 2. (For example, select the gear icon near the upper-right corner, select Admin
center, and then select New environment near the upper-right corner.) Then follow the prompts to complete
the sign-up process.

Get a license from scratch


Regardless of whether you have a license for PowerApps, you can start a free, 30-day trial of PowerApps Plan 2
by following these steps:
1. Open the PowerApps site, and then select Sign up free.
If you're using a phone, open the menu in the upper-right corner first, and then select Sign up free.
2. Near the middle of the screen, select Pricing, and then select Start free trial.
3. In the dialog box that appears, type or paste your work or school email address, and then select Submit.

IMPORTANT
For more information, see What email address can I use? later in this topic.

4. If a dialog box indicates that PowerApps recognizes your organizational credentials, follow the prompts
to finish signing in.

Otherwise, follow the prompts to check your email, verify your email address, provide more information
if necessary, and select Start.

FAQ
What email address can I use?
You can use a work or school address to sign up for a trial license. If you use another kind of address, you might
experience one of the symptoms in this table.

SYMPTOM / ERROR MESSAGE CAUSE AND WORKAROUND

Personal email addresses (e.g. [email protected]) PowerApps doesn't support email addresses provided by
consumer email services or telecommunications providers.
You receive a message like the following during signup:
To complete signup, try again using an email address
You entered a personal email address: Please enter assigned by your work or school.
your work email address so we can securely store
your company's data.

or

That looks like a personal email address. Enter


your work address so we can connect you with others
in your company. And don’t worry. We won’t share
your address with anyone.
SYMPTOM / ERROR MESSAGE CAUSE AND WORKAROUND

.gov or .mil addresses PowerApps doesn't support .gov or .mil addresses at this
time.
You receive a message like the following during signup:

PowerApps unavailable: PowerApps is not available


for users with .gov or .mil email addresses at this
time. Use another work email address or check back
later.

or

We can't finish signing you up. It looks like


Microsoft PowerApps isn't currently available for
your work or school.

Email address is not an Office 365 ID Your organization signs in to Office 365 and other Microsoft
services with IDs other than email addresses. For example,
You receive a message like the following during signup: your email address might be [email protected],
but your ID is [email protected].
We can't find you at contoso.com. Do you use a
different ID at work or school? Try signing in with To complete signup, use the ID that your organization has
that, and if it doesn't work, contact your IT
department. assigned to you for signing in to Office 365 or other
Microsoft services. If you don't know what this is, contact
your IT administrator.

What happens when my trial expires?


You'll be prompted to request an extension of the trial or purchase a plan 30 days after the trial starts. You can
find details about all plans on the pricing page.
If you don't extend the trial or purchase a plan but you still have another kind of license, you can still use all the
features of PowerApps that your other license provides. Any data in Common Data Service will remain as it is,
and any app or flow that uses Common Data Service will continue to run as it did if your license supports them.
If you try to use features that Plan 2 supports but your existing license doesn't (for example, modify a schema
or entities in Common Data Service), you'll be prompted to purchase a plan.
More questions?
Try the PowerApps community.
PowerApps Community Plan: a free development
environment for individual use
4/30/2019 • 5 minutes to read • Edit Online

If you want to build skills and learn more about PowerApps, Microsoft Flow, and the Common Data Service, the
PowerApps Community Plan is the right plan for you. The PowerApps Community Plan gives you a free
development environment for individual use, where you can:
Learn to build business apps and workflows with the full functionality of PowerApps and Microsoft Flow.
Connect to any data source by using our 100+ out of the box connectors or by creating your own custom
connectors.
Explore how you can use the Common Data Service to build powerful business apps with the common data
model and the SDK.
Export the solutions you create in your individual environment, and list them on AppSource so your customers
can test-drive them.

Who can sign up for the PowerApps Community Plan?


Anyone with a work or school account can sign up for the PowerApps Community Plan. But we especially
recommend this plan if you:
Want to build skills and learn more about PowerApps, Microsoft Flow, and the Common Data Service.
Are interested in building business apps and workflows to distribute on AppSource.

Where can I sign up for the PowerApps Community Plan?


Sign up on the PowerApps Community Plan website. If you are an existing user of PowerApps with Office 365 or
Dynamics 365, you can also create an environment for individual use.
After signing up for the Community Plan, you will be redirected to the PowerApps site and will land in your
individual environment. The environment is named with your name, for example 'John Doe's environment'. If
there is already an environment with that name, the individual environment will be named as 'John Doe's (1)
environment'. The following image shows how the environment appears.

Get the Community Plan with Visual Studio Dev Essentials


If you are a Visual Studio Dev Essentials user, PowerApps is included in your benefits. Visit My benefits and click or
tap the PowerApps tile to sign up for the PowerApps Community Plan.
Which features are included in the PowerApps Community Plan?
With the individual environment, you get the following functionality:

FUNCTIONALITIES ENVIRONMENT FOR INDIVIDUAL USE

Key features

Create and run apps Yes. You can create unlimited apps

Share apps* No

Use the Common Data Service Yes

Model your data using the Common Data Service Yes

Enterprise-grade administration of the environment and user Yes


policies

Connectivity

Connect to Office 365, Dynamics 365, and other connectors Yes

Connect to cloud-based services like Azure SQL, Dropbox, Yes


Twitter, and many more

Use premium connectors like Salesforce, DB2 and many more Yes

Access on-premises data using an on-premises gateway Yes

Create custom connectors to connect to your own systems Yes. You can create unlimited custom connectors

Common Data Service

Create and run applications on the Common Data Service Yes

Model your data in the Common Data Service Yes

Create a database in the Common Data Service Yes

Management
FUNCTIONALITIES ENVIRONMENT FOR INDIVIDUAL USE

Add co-workers as environment makers and admins No

Add co-workers to the database roles No

Supports data policies established by the Office 365 Yes


administrator

Establish data policies for the individual environment Yes

*You can't share apps, flows, connections, etc. with any other users of your tenant. You also can't add any other user
as an environment admin or maker, or to the database roles from the admin center.

What are the capacity limits for the individual environment?


CAPACITY

Flow runs/month 750

Database size 200 MB

File storage 2GB

You cannot apply add-ons to the quantities that we include. If you hit capacity limits, we recommend purchasing
PowerApps Plan 2. Learn more about it from the PowerApps pricing page.

NOTE
The capacity of the individual environment, whether or not it's used, doesn't contribute to your company's overall quota.

Publishing to AppSource
Do you have an app you would like to share with customers? We now support a PowerApps Test Drive solution on
AppSource.com as a way for you to share apps and flows with customers, and generate leads for your business.
For more information, see Let customers test drive your apps on AppSource.

Frequently Asked Questions


Q: What should I do if reach the capacity limits of the environment?
A: There is a limited capacity provided because this environment is meant for individual use, not for a team or
production use. The capacity provided is:

CAPACITY

Flow runs/month 750

Database size 200 MB

File storage 2GB

If you reach one or more capacity limits, we recommend you purchase a plan that supports production use. Learn
more about our plans and their limits on the PowerApps pricing page.
Q: Can I transfer the apps, flows, and other resources created in the individual environment, to another
environment?
A: Yes, you should be able to export the resources from this environment to other environments. For more
information, see Environment and tenant app migration.
Q: Will my PowerApps Community Plan subscription ever expire?
A: You can use your PowerApps Community Plan subscription perpetually for free. If you are actively using an
individual environment, then you won't lose access to any of the resources or functionality in that environment.
You may, however, notice a delay when accessing your Common Data Service Database for the first time after a
long period of inactivity. This delay does not impact the data or entities stored in the Common Data Service.
Q: Can I get or create multiple individual environments?
A: No, you can only have one individual environment, which is created for you by PowerApps when you sign up
for the Community Plan.
Q: What's the difference between PowerApps Plan 2 Trial and PowerApps Community Plan; and which one should
I sign up for?
A: Both PowerApps Plan 2 Trial and PowerApps Community Plan are free, but are created for different purposes:
PowerApps Plan 2 Trial gives you PowerApps Plan 2 for 30 days. This is meant for trying out PowerApps,
Common Data Service, and Microsoft Flow. Once your trial expires, you can purchase a plan. If you are already
using PowerApps with Office 365 or Dynamics 365, this is the right plan to try out the premium functionalities of
PowerApps, which are available with PowerApps Plan 2.
PowerApps Community Plan gives you access to PowerApps premium functionalities, Common Data Service,
and Microsoft Flow for individual use. This plan is primarily meant for learning purposes or creating business
solutions to be distributed for AppSource Test Drive. This plan is perpetually available, but only for learning and
building your skills on PowerApps, Common Data Services, and Microsoft Flow.
Q: Can I sign up with my personal account?
A: No, you can only sign up with your work or school account. We currently do not support signing up with a
personal account.
Q: Can I delete my individual environment?
A: You can't delete this environment on your own. Your tenant admin has permissions to delete the environment.
What's new in PowerApps
6/17/2019 • 2 minutes to read • Edit Online

This topic provides resources where you can learn about the new features that have recently released, new features
that will be releasing over the next few months, and known limitations.

Weekly releases
For information about the new features, fixes, and improvements released in the past few weeks, see Released
versions for Microsoft PowerApps.
To know more about how to browse information in the weekly release notes, read this blog post.

NOTE
Releases are rolled out over several days. New or updated functionality might not appear immediately.

Release plan
For information about new features releasing over the next few months that you can use for planning, see:
April 2019 release notes
2019 release wave 2 plan

Known limitations
For information about known limitations, see Common issues and resolutions.
How do I find and run apps?
8/22/2019 • 2 minutes to read • Edit Online

No need to manually work on a task to get your work done. With PowerApps, you can create and use a canvas app
or model-driven app to get your work done quickly. Once you create an app, you can share the app with your
organization.
Canvas apps give you a lot of control over the user experience of the app. An app maker can use templates to
create a canvas app, or they can configure the app any way they like. A canvas app, like its name, is a blank canvas,
so you can create an app to fit the needs of users in your organization.
Because canvas apps can essentially be anything, there isn’t much help documentation on how to use an app once
it’s created. If you need help using a canvas app, contact your app maker or PowerApps admin.
Model-driven apps use the Unified Interface that provides a responsive and accessible design. You can run the app
on a web browser or on popular mobile devices. The app has multiple components including dashboards, forms,
views, charts, and business processes that together help make the app easy to use. Model-driven apps are built
and modeled on the Microsoft Dynamics 365 Customer Engagement framework, so the user experience is similar
to Dynamics 365 Customer Engagement apps.
This section provides information about how to find and run canvas and model-driven apps from various places. It
also provides information on how to navigate and work within a model-driven app: Use model-driven apps.

What's required to run apps?


Ensure that you're using a supported device platform and browser.
To run canvas apps, download and install PowerApps from the App Store or Google Play.
To run model-driven apps:
on a phone, download and install Dynamics 365 for phones from the App Store or Google Play.
on a tablet, download Dynamics 365 for tablets from the App Store, Google Play, or Microsoft Store.
Run an app in a web browser
8/22/2019 • 2 minutes to read • Edit Online

When you create an app, or someone shares an app with you, you can run that app on Windows, iOS, Android, or
in a web browser. In this topic, you'll learn how to run a canvas or model-driven app in a web browser from the
Dynamics 365 Home page.
To follow this quickstart, you need:
A PowerApps license. This is available with a PowerApps plan, such as the PowerApps Plan 2 trial, or any of the
Microsoft Office 365 or Dynamics 365 plans that include PowerApps.
Access to an app that you built or that someone else built and shared with you.
Access to a supported web browser and operating system.
For canvas apps, see: System requirements, limits, and configuration values
For model-driven apps, see: Supported web browsers and mobile devices

Sign in to Dynamics 365


Sign in to Dynamics 365 at https://home.dynamics.com.

Find an app on the Home page


The Home page may show several types of business apps, but you can find a specific app by typing part of its
name in the search box. You can also filter the list to show only apps created by a specific source, such as
PowerApps. To do this, select Filter and then select the source.
If you've recently installed the app, it might not immediately appear in the list of apps. Select Sync to show all your
apps. This process may take up to a minute.

Run an app from a URL


You can save an app's URL as a bookmark in your browser and run it by selecting the bookmark, or you can send
a URL as a link through email. If someone else created an app and shared it with you in an email, you can run the
app by selecting the link in the email. When running an app using a URL, you may be prompted to sign in using
your Azure Active Directory credentials.
Connect to data
If an app requires a connection to a data source or permission to use the device's capabilities (such as the camera
or location services), you must give consent before you can use the app. Typically, you're prompted only the first
time.

Close an app
To close an app, sign out of the Dynamics 365 Home page, or open another app.

Next steps
In this topic, you learned how to run a canvas or model-driven app in a web browser. To learn how to:
run a canvas app on a mobile device, see Run a canvas app on a mobile device
run a model-driven app on a mobile device, see Run a model-driven app on a mobile device
use a model-driven app, see Use model-driven apps
Run a canvas app on a mobile device
11/18/2018 • 2 minutes to read • Edit Online

When you create an app, or someone shares an app with you, you can run that app on Windows, iOS, Android, or
in a web browser. In this topic, you'll learn how to run a canvas app on a mobile device. Apps running on a mobile
device can take advantage of the device's capabilities, such as location services and camera.
To follow this procedure, if you're not signed up for PowerApps, sign up for free before you begin, and then
download PowerApps from the App Store or Google Play onto an iPhone, iPad, or Android device running a
supported operating system. Also, make sure you have access to a canvas app that you created or that someone
else created and shared with you.

Open PowerApps and sign in


Open PowerApps on your mobile device and sign in using your Azure Active Directory credentials.

If you have the Microsoft Authenticator app installed on your mobile device, simply enter your username when
prompted, and then approve the notification sent to your device.

Find the app


To make it easier to find the app, open the PowerApps menu, and then select a filter.
The following filters are available:
All apps: Displays all apps to which you have access, including apps you created and apps that others
shared with you.
My Apps: Displays apps that you've run at least once.
Sample apps: Displays sample apps from Microsoft that showcase real application scenarios with fictitious
data to help you explore design possibilities.
Favorites: Displays apps that you've marked by tapping the ellipsis (...) on the app tile, and then tapping
Favorite. To remove an app from this list, tap the ellipsis (...) on the app tile, and then tap Unfavorite.

After you filter your apps, you can sort the filtered list by the date the apps were most recently opened or
modified, or alphabetically by name. These preferences are retained when you close and reopen PowerApps.

If you know the name of the app you want to run, you can tap the search icon at the top of Powerapps, and then
type part of its name in the search box.

If you filtered your apps, it will search the filtered list.

Run an app
To run a canvas app on a mobile device, tap the app tile. If someone else created a canvas app and shared it with
you in an email, you can run the app by tapping the link in the email.
If this is the first time you're using PowerApps, a screen shows the swipe gesture to close the app.
Give consent
If an app requires a connection to a data source or permission to use the device's capabilities (such as the camera
or location services), you must give consent before you can use the app. Typically, you're prompted only the first
time.

Pin an app to the home screen


You can pin an app to the home screen of your device for quick access. Tap the ellipsis (...) on the app tile, tap Pin
to Home, and then follow the instructions that appear.
Close an app
To close an app, use your finger to swipe from the left edge of the app to the right. On Android devices, you can
also press the Back button and then confirm that you intended to close the app.

Next steps
In this topic, you learned how to run a canvas app on a mobile device. You can also run model-driven apps on a
mobile device.
Run a model-driven app on a mobile device
Run a model-driven app on a mobile device
11/18/2018 • 2 minutes to read • Edit Online

After the app is created and then shared with you, you can run that app on a variety of popular mobile devices
such as Windows, iOS, Android, or in a web browser. In this topic, you'll learn how to run a model-driven app on a
mobile device.
To follow this procedure, if you're not signed up for PowerApps, sign up for free before you begin. Also, make sure
you have access to an app that you created or that someone else created and shared with you.

Run the model-driven app


Model-driven apps don't run in the PowerApps mobile app. Instead, you run a model-driven app on a mobile
device using either the Dynamics 365 mobile app or in the phone's web browser.
Use the mobile app
Install the Dynamics 365 for phones or Dynamics 365 for tablets app from your device’s app store. More
information: Install Dynamics 365 for phones and tablets

Run in your phone’s browser


Go to the Dynamics 365 home page or enter the app URL directly into your phone’s web browser and follow the
directions on your screen to load the app. More information: Run an app in a web browser
Next steps
In this topic, you learned how to run a model-driven app on a mobile device. For information about:
using a model-driven app, see Use model-driven apps
running a canvas-app on a mobile device, see Run a canvas app on a mobile device
Run a canvas app from a SharePoint page
11/18/2018 • 2 minutes to read • Edit Online

You can add a PowerApps canvas app to a SharePoint Online page using the PowerApps web part. Then users can
run the app from the SharePoint Online page. More information: Office: Use the PowerApps web part
Add an app to Microsoft Teams
11/18/2018 • 2 minutes to read • Edit Online

Microsoft Teams is a chat-based collaboration platform built on Office 365 technologies. You can customize the
Teams experience by adding PowerApps canvas apps to your channels in Teams. In this topic, you learn how to add
the Product Showcase sample app to a Teams channel, and then open the app from that channel.

If you're not signed up for PowerApps, sign up for free before you begin.

Prerequisites
To follow this procedure, you need an Office 365 subscription and a channel in Teams.

Sign in to PowerApps
Sign into PowerApps at https://web.powerapps.com.

Add an app
1. In Microsoft Teams, select a team, and a channel under that team. In this example, it's the General channel
under the Business Development team.
2. Choose + to add a tab.

3. In the Add a tab dialog box, choose PowerApps.

4. Choose Sample apps > Product Showcase > Save.


The app is now available to use in the channel.

NOTE
You must share your own apps before you add them to Teams (sample apps are shared by default).
Open an app
1. In Microsoft Teams, choose the team and the channel that contains the app.

2. Choose the Product Showcase tab.

The app opens in the channel.

Known issues
In the desktop app for Microsoft Teams:
Apps must load content such as images and .pdf files over a secure (https) connection.
Not all sensors, such as Acceleration, Compass, and Location, are supported.
Only these audio formats are supported: AAC, H264, OGG Vorbis, and WAV.
Clean up resources
To remove the app from the channel, choose the Product Showcase tab > Remove.

Next steps
In this topic, you added the Product Showcase sample app to a Teams channel, and then opened the app from that
channel. To learn more about PowerApps, continue to the PowerApps tutorials.
PowerApps Tutorials
Discover apps via AppSource
11/18/2018 • 2 minutes to read • Edit Online

The apps you build and publish with PowerApps are discovered and used in Dynamics 365 on the web. It displays
all of your apps -- the apps that you've specifically chosen to use (that is, by launching from a share email or
opening from AppSource) or that an admin has provisioned for you. This includes all of your apps from
PowerApps, as well as Dynamics 365 applications from Microsoft. You can search for apps, filter by environment,
and pin the apps you use most frequently to the top of the page.

Find apps via the AppSource organization gallery


Microsoft AppSource is now embedded in the Dynamics 365 home page and throughout the common navigation.
It now includes a private gallery of apps available to you within your company. Select Get more apps from the
home page or task pane, and navigate to the My Organization tab to see apps that are available to you.
Apps built with PowerApps and shared with a security group or the entire company with User permission will
appear here, instead of cluttering your home page by default. When you get an app from AppSource, it will then
appear on the home page and be easily accessible throughout the experience.
Use model-driven apps in PowerApps
11/18/2018 • 2 minutes to read • Edit Online

A model-driven app has multiple components including dashboards, forms, views, charts, and business processes
that together help make the app easy to use. This section provides information on how to navigate around in a
model-driven app, work with records, import/export data, and automate processes using Microsoft Flow.

IMPORTANT
Because canvas apps provide a lot of control over the user experience and can essentially be anything, there isn’t much help
documentation on how to use a canvas app. If you need help using a canvas app, contact your app maker or PowerApps
admin.

Related topics
Enhanced user experience with the Unified Interface
Basic navigation in a model-driven app
See also
Find and run apps
What is a model-driven app?
What is a canvas app?
Enhanced user experience with the Unified Interface
for model-driven apps
8/15/2019 • 2 minutes to read • Edit Online

The Unified Interface for model-driven apps provides a consistent and accessible user experience across devices—
whether on a desktop, laptop, tablet, or phone. The apps scale by reflowing the components on the screen. The
responsive design adapts to your environment based on screen size, so the more available space that you have, the
more information can be displayed.

Navigation
The menu options let you swiftly navigate the different apps in the system. They provide quick access to recently
viewed records and pinned favorites.

1. Site map is expanded and persists by default.


2. The subarea that you are currently in is highlighted to indicate where in the app.
3. Recent and Pinned items are at the top for easy access.
4. Use the Area switcher to switch between apps.
5. Icons have unique colors on the command bar to show differentiation between commands.
For more information, see Basic navigation in a model-driven app.
Dashboards and charts
You can access all the system and user dashboards from within your Unified Interface apps. The interactive
dashboards are now available for all record types with richer interactive dashboard capabilities. For more
information, see Track your progress with dashboards and charts.

Timeline control
The timeline view helps you collaborate with your team by tracking customer communication in a record on a
single page in an easy-to-read view. You can see everything from posts and voice attachments, to emails and
notes. It provides a quick way to see the entire communication thread. For more information, see Add an
appointment, email, phone call, notes or task activity to the timeline.

Business process
The business process flow has been improved by the docking mechanism. You can dock the business process
stage on your screen to help you stay focused on the task at hand in your business process flow. This is especially
useful when the stage of the process has complex steps to complete. For more information, see Work with
business processes.

Accessibility
The improved accessibility experience lets you use screen readers to translate on-screen information into audible
sound and print to a Braille reader so that more people can use the app. For more information, see Use a screen
reader.

Unified Interface Community


Go to the Unified Interface Community site to get help with planning and executing a smooth transition to the
Unified Interface and engage with experts and peers on blogs, webinars, videos, events, and more.
Basic navigation in a model-driven app
2/27/2019 • 2 minutes to read • Edit Online

Use the navigation bar to get to your work area, create a new record, search, or do other tasks in a model-driven
app.

1. The site map is expanded and persists by default.


2. The sub area that you are currently in is highlighted to indicate where you are in the app.
3. Recent and Pinned items are at the top for easy access.
4. Use the Area switcher to switch between apps.
5. Icons have unique colors on the command bar to show differentiation between commands.

Get back to recent records, items, or view


You probably work with the same records most of the time. For example, you might access the same contact or
account on a regular basis. Or you might work with the same lists (views) of data over and over. You can quickly
get back to recently used records or views from the site map. You can also pin records and views to make them
easier to find.
1. From the Site Map, select Recent.
2. Under Recent, choose the record, item, or view you want to go back to.

Pin records, items, or view


1. From the Site Map, select Recent to expand the list of recently accessed items.
2. Select the pin icon next to the item in the recent list, and it will be added to the pinned list.
Unpin records, items, or view
1. From the Site Map, select Pinned to expand the list of pinned items.
2. Select the unpin icon next to the item, and it will drop off the list.

Record set navigation


Navigate through multiple records with preset views and queries. The record-focused navigation improves
productivity by allowing users to jump from record to record in the list and easily navigate back without losing
their working list.
Reference panel
The reference panel is a great way to get work done without moving away from the screen you’re on. You can look
up other related things, such as cases or opportunities for an account, within the context of the record you’re
viewing without navigating to other screen.

Watch this video to learn more about the Reference Panel:

Notifications
There are three types of notifications that are shown on a form: Informational, Warning and Error. Notifications
are always available at the top of the form, just above the header.
The notifications described below are available with version 9.1.9.3010.
If there is only one notification you will see a single line.

If there is more than one notification, you will see the number of notifications. Select the chevron, to view each
message.
11/18/2018 • 2 minutes to read • Edit Online

View your user profile


Your user profile displays useful information about you to your entire organization; for example, your contact
information, your organization, and your security role. Depending on your security role, you might be able to make
changes to your user profile.
1. In the upper-right corner of the screen, select Settings > Personalization Settings.
2. Scroll down to the very bottom of the Set Personal Options dialog box, and then choose View your user
information.
3. Select the different areas such as Summary, Details, or Administration to see details about your profile.
Set personal options
8/5/2019 • 5 minutes to read • Edit Online

[This topic is pre-release documentation and is subject to change.]


Change your display settings in an app to suit your preferences. For example, you can choose the page that you
want to see as soon as you sign in to the app. You can also personalize many other options such as language,
currency, and time zone.

To set personal options


1. Select the Settings button in the upper-right corner of the screen.
2. Select Personalization Settings.
3. Fill in the information, as required.
4. When you’re done, select OK.

General tab options


OPTIONS DESCRIPTION

Select your home page and settings for Get Started


panes

Default Pane Select the default home pane (page) that you want to see
when you sign in. By default, the Default based on user role
option is selected, which shows the default pane based on the
app you are using.

Default Tab Select the default tab that you want to see for the selected
default pane. For example, select the Accounts tab for the
Service pane.

Set the number of records shown per page in any list of


records

Records Per Page Select the maximum number of records you want to see in a
list on a page. You can set a value from 25 to 250.

Select the default mode in Advanced Find

Advanced Find Mode By default, every time you open the Advanced Find Mode
dialog box, the query details are hidden. To see the query
details every time, select Detailed.

Set the time zone you are in

Time Zone Select the time zone that you want to display for your region.
OPTIONS DESCRIPTION

Select a default currency

Currency Choose the default currency value to use in financial


transactions. Select the Lookup button to search for a
currency.

Support high-contrast settings

Enable high contrast Select this check box to enable high-contrast levels in your
app display. Tip: Set this option if you are using high contrast
settings in your browser or operating system.

Set the default country/region code

Enable country/region code prefixing Select this check box to enable the default calling code for
your region.

Country/Region Code Prefix Enter the value of your region’s calling code in the text box.
For example, enter +1 for the United States.

View your user information Select this link to view details about you. These details are
displayed to your entire organization and include your contact
information and security role. For more information, View your
user profile.

Synchronization tab options


OPTIONS DESCRIPTION

Synchronize Dynamics 365 items with Outlook or


Exchange

filters Choose the records to synchronize between Dynamics 365


and Dynamics 365 for Outlook or Exchange (using server-side
synchronization).

synchronized fields View the fields that are synchronized between Dynamics 365
and Dynamics 365 for Outlook so you can see where the data
is coming from.

Manage your offline filters and take your information


offline in Dynamics 365 for Outlook

offline filters Choose a subset of Dynamics 365 data that you want to work
with when you go offline with Dynamics 365 for Outlook.

Activities tab options


OPTIONS DESCRIPTION

Default view
OPTIONS DESCRIPTION

Default Calendar Select the default view for your calendar.

Start Time Select your default work hours.

Formats tab options


OPTIONS DESCRIPTION

Current Formats

Customize Choose this option to add a new region and formats.

Format preview Shows the current region and its formats for Number,
Currency, Time, and Date.

Email Templates tab options


OPTIONS DESCRIPTION

Create and modify personal email templates

New Create an email template with custom values (such as a date


or signature), so you don’t have to enter the same
information, repeatedly, when you send an email.

On the command bar, select New and enter values for the
template.

Email Signatures tab options


OPTIONS DESCRIPTION

Create and modify personal email signatures

New Create an email signature to save time and be consistent in


your responses. The owner of an email signature can be a user
or a team.

On the command bar, select New and enter values for the
signature.

Email tab options


OPTIONS DESCRIPTION

Select if other users can send emails for you


OPTIONS DESCRIPTION

Allow other users to send email on your behalf. Select this option to allow other users of Dynamics 365 to
send email on your behalf. Caution: If you select this option,
other users can send email on your behalf with or without
your consent. Your email name will appear as the sender.

Select the email messages to track in Dynamics 365

Track Select the email messages that you want to automatically


track in Dynamics 365.

Options:

- All Email messages


- Email messages in response to Dynamics 365 email
- Email messages from Dynamics 365 Leads, Contacts and
Accounts
- Email messages from Dynamics 365 records that are email
enabled

Configure Folder Tracking Rules Set up folders to automatically track incoming email.

Automatically create records in Dynamics 365

Create Select this option to allow Dynamics 365 to create leads or


contacts automatically from the information in tracked email
messages.

Show emails as conversation on Timeline Select this to list emails in a conversation thread, the way
many email applications work when viewing emails in a
conversation.

View your Mailbox Select this link to see your mailbox details.

Privacy tab options


NOTE
This tab isn’t available if your system administrator has selected the privacy preference for the entire organization in System
Settings. Talk to your administrator.

OPTIONS DESCRIPTION

Select your error notification preference

Options: Specify what you want Dynamics 365 to do when an error


occurs. Based on your selection, the error reports are shared
- Ask me for permission to send an error report to Microsoft. with and used by Microsoft for product improvements.
- Automatically send report to Microsoft without asking me
for permission. We recommend that you send the error reports to Microsoft
- Never send an error report to Microsoft about Dynamics so that Microsoft can use the information for product
365. improvements.

Languages tab options


OPTIONS DESCRIPTION

Select the language you prefer to see Dynamics 365


displayed in

Base Language Shows the base language. The base language is set during the
Dynamics 365 installation process. You can’t edit this option.

User Interface Language Select the language that you want to see for labels and dialog
boxes in the Dynamics 365 user interface.

Help Language Select the language for Help. To add an additional language
other than the base language, your admin must install the
required language packs and enable them. Talk to your
administrator.
Use a screen reader
11/18/2018 • 5 minutes to read • Edit Online

Screen readers make model-driven apps accessible to people who have low or no vision or might need extra
support for a temporary scenario, such as eye fatigue. Commonly used screen readers such as Narrator, JAWS,
and NVDA are supported.
Learn more about working with Microsoft Narrator
Learn more about working with JAWS
Learn more about working with NVDA

Basic tasks using a screen reader


Open an app
1. On the navigation bar, use the Tab key to move to the app drop-down control and press Enter to open the site
map.
2. Press the Tab key until you hear the name of the application you want to open—for example, “Sales.” Press
Enter to open the app.
Use scan mode in Narrator
You can use scan mode to quickly navigate apps using the arrow keys and common keyboard shortcuts. Quickly
jump to headings, links, landmarks, form fields, controls, and tables in this mode. Turn scan mode on and off by
pressing Caps lock+Spacebar. More information: Using scan mode
Find your way around the app
Navigation bar
When you open an app, a vertical bar with subarea icons is displayed on the left. You can either use the Tab key to
move through these icons until you hear the name of the subarea you want, such as “Accounts,” or you can use the
site map control. For example, press the Tab key until you hear “Accounts” and then press Enter to open the
Accounts view.
Grids
Screen readers navigate grids more reliably and consistently, and announce row and column headings, as well as
the position within the grid. When you first open a grid, the default tab stop is the view selector.
Whenever you enter a cell within the grid from outside of the grid, Narrator announces the name of the table, the
row and column counts, and the position of your cursor within the table.
If your cursor is within the table header, quickly navigate between headers by using the Tab key or Shift+Tab.
Narrator will announce the name of each header as you enter the header cell. It also announces the type of cell (for
example, “column header”), the location of the column (for example, “column 1 of 6”), and whether the column is
sorted or selected. If you press Enter in a table header, it will sort the table by that column. Narrator announces the
sort order, and you can press Enter again to change the order.
When you move out of the last column in the table, the cursor moves to the second row of the grid, and from this
point, you must use the Up and Down arrow keys to navigate between the non-header cells. If you instead press
the Tab key again, your cursor will move to the next interactive element, typically the table filter list. When moving
between non-header row cells, Narrator announces the column name, the location of the column, and text within
the cell.
Forms
Multiple navigation modes are available for navigating a form using Narrator, with the most common modes
being landmarks, headings, and form fields. To change the navigation mode, press Caps lock+Up arrow. Hold the
Caps lock key down while pressing the Up arrow key to cycle through the modes until you hear the mode you
want to use. Then use Caps lock + the Left/Right arrow keys to navigate through the various items. For example, if
you want to go to the Last Name field in the Contact Information section of a contact, do the following:
1. Press and hold the Caps lock key and press the Up arrow key until you hear “Landmarks.”
2. Press and hold the Caps lock key and press the Right arrow key until you hear “Contact information.”
3. Change the mode by pressing and holding the Caps lock key and pressing the Up arrow key until you hear
“Form Fields.”
4. Navigate to the Last Name field by using Caps lock + the Left/Right arrow keys until you hear “Last Name.”
Narrator also announces the control type, value, state, and any special instructions for the field.
You can also use the Tab key to quickly navigate to interactive elements on the form. Some form fields have an icon
that will perform the default action when you press Ctrl+Enter. For example, an email form field might have an
envelope icon that opens an email editor.
Dashboards/charts
You can navigate through the dashboard charts using the Tab key and Caps lock + arrow keys. Press the Tab key
to quickly go to the interactive elements and use Caps lock + an arrow key for navigation of non-interactive
elements, such as headings, landmarks, and items.

NOTE
You must have the latest Windows 10 Update installed to have all of the accessibility features available for charts.

Interactive dashboard streams


You can use the Tab key or Shift+Tab keys to move between interactive dashboard streams, such as found in the
Accounts dashboard, or just change the navigation mode until you hear “Headings” and then use the Tab key to
quickly move between dashboard streams.
To navigate through each element of a dashboard stream, use the Up/Down arrow keys. Narrator will read the
type of control and the title of the control.
Business process flows
You can navigate a business process flow, such as the one found at the top of the Lead form, by pressing the Tab
key to move forward, and Shift+Tab to move backward between the entities. Use the Enter key on the Move to
the Left or Move to the Right buttons to display additional entities in the process flow. Narrator reads the entity
type, stage, status, title, element number out of total elements, and whether it is currently selected.
Dialog boxes
When a dialog box opens, Narrator announces the title. For dialog boxes with input fields, the Close button has the
default focus, allowing you to close the dialog box by pressing Enter. For dialog boxes that require user action, the
focus is on the primary action button, such as Delete or OK.
You can navigate through the controls by using the Tab key. The cursor will loop through each element in the
dialog box, and you can press Esc to close it.
Use keyboard shortcuts in PowerApps
11/18/2018 • 7 minutes to read • Edit Online

Keyboard shortcuts give you an alternate way to do common tasks instead of using your mouse or tapping with
your finger. They help in seamless navigation of the interface. The following keyboard shortcuts apply across apps.

NOTE
The keyboard shortcuts described here refer to the United States keyboard layout. Keys on other keyboard layouts might not
correspond exactly to the keys on a US keyboard.

Form shortcuts
TASK UNIFIED INTERFACE

Complete the command for the active option or button Enter

Cancel a command, or close a selected list or dialog box Esc

Save Ctrl+S

Save and Close N/A

Cancel edits and close (Close) Esc

Delete the record (when forms are in edit mode) N/A

Save and then open a new form (Save and New) (when forms N/A
are in edit mode)

Open the lookup menu with the most recently used items in Down arrow
alphabetical order

Open a lookup drop-down list Enter

Close a lookup drop-down list Esc

Open a record found in lookup with forms in edit mode Enter

Add an article to an email N/A

Apply an email template (when editing an email message) N/A

Form navigation shortcuts


TASK UNIFIED INTERFACE

Move to the next option, option group, or field Tab


TASK UNIFIED INTERFACE

Move to the previous option, option group, or field Shift+Tab

Move between options in an open list, or between options in a Arrow keys


group of options

Go to the Command Bar N/A

Go to the landmark section of a page Ctrl+[

Editable grids (views)


If your administrator has enabled editable grids (views), you can edit data directly in a grid (view ). The following
table lists the keyboard shortcuts:

TASK UNIFIED INTERFACE

When the focus is on a column header, sort by column Enter key

When the focus is on a column header, open filter dialog Spacebar

When the focus is on the cells, move to the next field Right arrow (→) key

When the focus is on the cells, move to the previous field Left arrow (←) key

When the focus is on the column header, move to the next Tab
column header

When the focus is on the column header, move to the Shift+Tab


previous column header

Move to the cell above Up arrow (↑) key

Move to the cell below Down arrow (↓) key Or Enter, when cell is not in edit mode

Go to edit mode for Text, Number, and Simple fields when the Type the value directly to overwrite the existing value Or
focus is on a field Spacebar to continue modifying the existing value Or F2 to
select the existing value

Go to edit mode for Date and Time fields Type the value directly Or F4 or Alt+↓ to display the date/time
picker

Go to edit mode for drop-down (Lookup, Option Set) fields Spacebar to open the list

Go to edit mode for Two Options fields Spacebar to switch between the two options Or F4 Or Alt+↓
to open the list

Move between entries in an open drop-down list Up/Down (↑/↓) Arrow keys

Select an option in an open drop-down list Enter

Close an open drop-down list Esc


TASK UNIFIED INTERFACE

Cancel your edits Esc

Navigate to and open the lookup record Enter when the focus is on (→) icon

Move to the next page (if any) Page down key

Move to the previous page (if any) Page up key

Move to the column header when the focus is in the grid Shift+Tab

Move to the Save button when the focus is on the column Tab
header (if any unsaved data)

Move to the Refresh button when the focus is on the column Tab
header

Interactive dashboard shortcuts


Interactive dashboards enable new functionality, such as filtering, sorting, and quick actions.

TASK UNIFIED INTERFACE

Activate a dashboard element (simulate left-click) Enter Or Spacebar

Move to the next element Tab

Move to the previous element Shift+Tab

Move to the next item within a dashboard element Down (↓) arrow key

Move to the previous item within a dashboard element Up (↑) arrow key

Close a menu Escape

Select a check box or radio button Spacebar

Modify the date range filter Ctrl+Alt+D

Show the visual filter pane Ctrl+Alt+V

Move to the global command bar Ctrl+Alt+A

Global filter shortcuts


TASK UNIFIED INTERFACE

Open a menu Enter Or Spacebar Or Down (↓) arrow key

Activate a button Enter Or Spacebar


TASK UNIFIED INTERFACE

Move to the next element Tab

Move to the previous element Shift+Tab

Open a tree view control Right (→) arrow key

Close a tree view control Left (←) arrow key

Move to the next tree view node Up (↑) arrow key

Move to the previous tree view node Down (↓) arrow key

Move to the first tree view node Home

Move to the last tree view node End

Perform the default action for the tree view node Enter

Remove a filter Delete

Dashboard stream control shortcuts


TASK UNIFIED INTERFACE

Move to the first command on the active dashboard stream's Ctrl+Alt+Q


command bar

Move to the next element Tab

Move to the previous element Shift+Tab

Activate a button Enter Or Spacebar

Activate the Sort by field button and open flyout Enter Or Spacebar Or Down (↓) arrow key

Move to the next item Down (↓) arrow key

Move to the previous item Up (↑) arrow key

Move to the first item Home

Move to the last item End

Move to the next stream Ctrl+F6

Move to the previous stream Ctrl+Shift+F6

Close a menu Escape

Change the state of a check box Spacebar


Common controls
Chart shortcuts
TASK UNIFIED INTERFACE

Move to the first element in a chart Tab

Move to the next data point Right (→) arrow key OR Down (↓) arrow key

Move to the previous data point Left (←) arrow key OR Up (↑) arrow key

Move to the first data point Home

Move to the last data point End

Move to the See More button in a Tag chart Tab

Move back from the See More button to the tags in a Tag Shift+Tab
chart

Filter the dashboard when the focus is on a data point in an Enter Or Spacebar
interactive dashboard

Date -Time control shortcuts


TASK UNIFIED INTERFACE

Open the date picker flyout Enter Or Spacebar Or Down (↓) arrow key

Activate the option and close the flyout Enter Or Spacebar

Move to the next item Down (↓) arrow key

Move to the previous item Up (↑) arrow key

Move to the first item Home

Move to the last item End

Close the date picker flyout Escape

Move to the next element Tab

Move to the previous element Shift+Tab

Select the calendar Enter Or Spacebar

Activate a button Enter Or Spacebar

Search results shortcuts


TASK UNIFIED INTERFACE

Move to the next search result Up (↑) arrow key

Move to the previous search result Down (↓) arrow key

Move to the list of available views Right (→) arrow key

Move from the list of available views to search results Left (←) arrow key

Navigate between buttons Tab

Navigating submenus
If you use a screen reader, follow these steps to access any of the submenus that are displayed when you hover the
mouse over a navigation link.
1. Navigate between the menu options using standard link navigation.
2. Activate the link by selecting Enter or the space key as you usually would. A list of submenus will be displayed.
3. To access these submenu options, use the assistive technology (AT) shortcut key to navigate to the next button.
For example, if you use the NVDA screen reader, you would use the “b” shortcut key (NVDA+b). To navigate
through all the options, select the key repeatedly.

IMPORTANT
Several areas in the user interface (UI) have auto-collapse built in for menus. This includes the Navigation Bar and Form
Navigation. Both expand when selected, but after 30 seconds of inactivity, the items collapse.

Navigating through stages of a process


If you’re in a record—for example, a lead—this section shows you the keyboard shortcuts to navigate through the
different stages in the sales process to qualify the lead, and how to make selections in those stages. For example, if
you want to move easily from the Qualify stage through to the Close stage, try these keyboard actions:
After you select a stage, get to the fields by selecting the Down (↓) arrow.
If a stage is collapsed, select Enter to expand it.

NOTE
The process name is an icon at the bottom of the page, not the top.

Keyboard shortcuts in Windows: If you are using the Windows operating system, select the following link
and choose the version number from the drop-down list. You can view all the shortcuts that are applicable to
a Windows environment. See Windows keyboard shortcuts.
Keyboard shortcuts in Mac: If you are using a Mac operating system, select the following link to view all
the shortcuts that are applicable to a Mac environment. See Mac keyboard shortcuts.
Create a new record
8/5/2019 • 2 minutes to read • Edit Online

[This topic is pre-release documentation and is subject to change.]


The Create a new record command or Quick create makes it fast and easy to enter almost any type of
information into the system. The command is on the nav bar, so it’s available whenever you need to enter new
information into the system. You can also save a record and create a new one directly from the Quick create form.

NOTE
The Quick create option is only available for records that are enabled by your admin.

1. On the navigation bar, select the plus sign , and then select the item you want.
2. Fill in the fields, and then select Save and Close. Or, to save and create another record, select the down
arrow and then select Save & Create New.
NOTE
An asterisk next to the field on the screen means the field is required. If you select Save and Close before entering
required fields an error message will be displayed or if you have entered information and select Cancel a warning will be
displayed.
A plus sign next to the field on the screen means your organization recommends that you fill in the field.
Add an appointment, email, phone call, note, or task
activity to the timeline
8/5/2019 • 4 minutes to read • Edit Online

[This topic is pre-release documentation and is subject to change.]


Add Activities in the Timeline wall to keep track of all your communications with a customer or contact. For
example, you can take notes, add posts, add a task, send email, add phone call details, or set up appointments. The
system automatically timestamps every activity and shows who created it. You and other people on your team can
scroll through the activities to see the history as you work with a customer.
Activities that you add from within a record appear in the Timeline wall of the record.
If the Regarding field of an activity is set, the activity appears in the record it is associated with.
You can also choose the filter pane to filter the activities by record type and date.
When a new activity is created, you will get a What you missed notification in the Timeline wall.
An email with an attached image will be shown inline with the body of the email.

Add an activity from the nav bar


The fastest way to add an activity is to use the shortcut on the nav bar and then link it to a record. For example, you
can create a phone call activity and then link it to a contact in the system using the Regarding field.
1. On the nav bar, select the plus sign , and then select Activities.

2. Choose the type of activity you want to add.


3. Fill in the required information. Use the Regarding field to associate the activity with a record.
4. When you're done, select Save.

Add a phone call


1. Open the record that you want to add the activity to. For example, a contact record.
2. In the Timeline wall, select plus sign > Phone Call.

3. Fill in the Subject of the call.


In the Notes area, provide a summary of the conversation with the customer.
The Call To field is automatically populated with the record you added the phone call activity to. You can
select a different record if needed.
4. By default, the direction is set to Outgoing. You can change it to Incoming by selecting Outgoing.
5. When you're done filling in the form, select Save to save the activity.
Add a task
1. Open the record that you want to add the activity to. For example, a contact record.
2. In the Timeline wall, select plus sign > Task.
3. The Owner field is set to the current user by default. If you want to reassign the task, select the lookup icon,
and then select another user or team.
4. When you're done filling in the form, select Save to save the activity.

Add an email
To add an email activity to a record, you must first save the record you are adding the activity to.
1. Open the record that you want to add the activity to. For example, a contact record.
2. In the Timeline wall, select plus sign > E -mail.
3. Fill in the subject of the email and use the space provided to write the email.
4. To add an attachment to the email, save the email. Then, in the Attachments section, select + to add an
attachment.
5. To use a template for the email body, on the command bar, click Insert Template, and then select the
template.
6. When you're done filling in the form, select Send.

NOTE
To list emails in a conversation view, go to Settings > Personalization Settings > Email tab and then select Show
email as a conversation on Timeline. For more information on personal settings, see Set personal options.
Add an appointment
To add an appointment activity to a record, you must first save the record you are adding the activity to.
1. Open the record that you want to add the activity to. For example, a contact record.
2. In the Timeline wall, select plus sign > Appointment.
3. Use the tooltips to fill in the required information.
4. When you're done filling in the form, select Save to save the appointment.

Add notes
You can also easily add notes in the activities area.
1. Open the record that you want to add the activity to. For example, a contact record.
2. In the Timeline wall, start entering your notes. Use Add an attachment to add any attachments to the
note.
3. When you're done filling in the form, select Add Note to save the note.

NOTE
You can also add a note using the plus sign in the upper section of the Timeline wall.

Once the note has been added, you can delete or edit the note.
Add a post
1. Open the record that you want to add a post to. For example, a contact record.
2. In the Timeline wall, select plus sign > Post.
3. Enter your post in the text field
4. When you're done filling in the form, select Add to save the post.

Once you save the post, it will appear at the top of the timeline wall.

Refresh the Timeline


You can refresh the timeline wall to see the most up to date information.
In the Timeline wall, select and then select Refresh Timeline.

Use the filter pane


Quickly filter activities, notes or posts in the timeline wall by record type or activity type and date using the filter
pane. You can select multiple filters and filter options at the same time. You can filter and see activity due date,
modified date, or by the status of the activity.
In the Timeline wall, select Open Filter Pane funnel icon.
Manage Activities
Manage activities directly from the timeline wall including assigning an activity to another person, deleting or
closing an activity, add an activity to a queue, opening an associated record or editing notes and posts.
Frequently Asked Questions about Activities and the
Timeline Wall
6/28/2019 • 2 minutes to read • Edit Online

Is a title required when adding a new note?


No. When adding a note to an activity, the title field is marked as a mandatory field but is not required. This is a
known issue in the legacy Web Client.

For an appointment, when I choose the option to Save as Draft it


doesn't show that the appointment has been saved as a draft.
When you save an appointment in the legacy Web Client as a draft the title does not display [DRAFT] to indicate
that the appointment has been saved as a draft.

Can I add activities to read only records?


Yes. You can add activities to entities that are read only such as, notes, phone calls, tasks, and more.

Are HTML tags supported in Notes?


No. When creating a note activity for any record or entity, HTML tags are not supported. For example, if you add
<TAG> </TAG> to a note field it will be displayed as <TAG_XXX="XX"> </TAG> .

How can I improve performance on timeline wall?


Timeline Wall performance can be improved by optimizing how much data is returned by a specific entity record.
1. Configure entity forms to only show activities that are in use. This can be done at the form level to only show
useful activities. For example, if you don’t use tasks for cases you can configure the timeline wall on the case
form to not show tasks.
2. Reduce the number of default records that are shown by the timeline wall. By default, it is set to return 10,
beyond 10 it can cause performance issues. It is recommended to not exceed the default.

Activity Wall is not supported in Print Preview.


When you select the Print Preview option in Dynamics 365 the Timeline Wall will not show in the available list.
You will see Notes but it will not show tasks or emails.
Assign or share records
7/23/2019 • 2 minutes to read • Edit Online

If you would like another person in your organization to handle a customer record, you can assign the record to
that person. You can also assign a record to a team, or to yourself.
Use the Share option if you want to keep ownership of the record but let someone else work on it with you.
1. From the left navigation pane, select a record type. For example, Contacts.
2. From the list of records, select the record that you want to reassign.
3. On the command bar, select Assign.

NOTE
If you want to keep ownership of the record but let someone else work with it, select Share. Then use the tooltips to
guide you through the Share option.

4. In the assign dialog box, in the Assign to area, choose Me or User or Team.

If you select User or Team, in the Look for Records box, enter the name of the user or team. If you need to
create a new record, select + New.
5. When you're done, select Assign.

Use advanced find to reassign records


Use advanced find to search for records and then reassign them to someone else. For more information on
advanced find, see Create, edit, or save an Advanced Find search.
1. On the command bar, select Advanced Find.

2. From the list of records, select the records that you want to reassign and then select the assign option.

Reassign all records (for admins)


A admin can reassign all record for a user from the admin Setting area.
1. Go to Settings > Security.
2. Select Users and select a user name to open the user's profile.
3. On the command bar, select REASSIGN RECORDS.

4. On the Reassign Records dialog box choose how to want to reassign all the records and then select OK.

NOTE
The Reassign Records option will reassign all records regardless of their status. Inactive and active records will be reassigned
to the other user or team.
Share records using Access Team
2/20/2019 • 2 minutes to read • Edit Online

Access Team grant access to records via sharing records. Access Team members have privileges defined by their
individual security roles and by roles from the teams they are members of.

NOTE
Before you can share records using Access Team, your admin will need to set-up an Access Team template. For more
information, see About team templates.

1. To give a user permission to access a record, from the site map, select the record type. For example, Accounts.
2. From the list of records, open the record that you want to provide another user access to.

3. In the Access Team Members section, select More Commands (… ) > Add User.

4. In the search box type in the user name to find the user and then select Add.

Remove a user from Access Teams


You can easily remove a user’s access to a record just as easily add you added them.
1. Open the record that you want to remove the user from.
2. Under Access Team Members sub-grid, select Remove user.
Add a connection role to link records to each other
8/22/2019 • 2 minutes to read • Edit Online

[This topic is pre-release documentation and is subject to change.]


Connections enable you to easily associate users, contacts, quotes, sales orders, and many other entity records with
each other. The records in the association can be assigned particular roles that help define the purpose of the
relationship.
It's a quick way to create multiple connections and roles for a particular record. For example, a contact may have
many relationships with other contacts, accounts, or contracts. In each relationship a contact may play a different
role.
Connection roles are directly associated to a connection. To use a connection role, you must first add a connection
to your record.
Before you can add connection roles, it needs to be enabled by your admin. For more information see, Configure
connection roles.
1. To add or manage connections, select the record you want to manage like an opportunity.
2. Select the Related tab and then select Connection. This will open the connection grid with the list of
connections for the record.

3. Select Connect and then choose To Another or To Me.


4. On the Name field, enter or find the name of the record for the connection.
5. On the As this Role field select the lookup icon and then choose New Connection Role. Or, use the search
to find an existing role that you want to associate to the connection and then select Save.

NOTE
If you have entered information before creating a new connection role, a warning dialog will be displayed asking if you
would like to cancel and continue working on the connection or to go ahead and leave the current record you are
working on.

6. To create a new connection role, on the New Connection Role screen enter a name and then choose a
Connection Role Category.
7. When you are done, select Save & Close.

Manage Connection Roles


To manage a connection role, select the connection role from a connection entity. This will open the connection role
entity record. You can edit the name, select a connection role category, and add a description.

You can also manage the connection role types that you want associate to the connection role.
1. Open the connection role and then select Manage Record Type on the command.
2. This will open a list of connection role types that you can add or remove for this connection role.
11/18/2018 • 2 minutes to read • Edit Online

Deactivate or activate an account or contact


In a model-driven app, you can deactivate an account or contact rather than deleting it. This ensures the integrity of
the audit trail associated with that record.
A deactivated account or contact becomes inactive, which means it cannot be edited or used in establishing new
relationships with other records. However, all relationships created with the deactivated item are still available.
If later you need to reactivate a deactivated account, it's easy to do so.

Deactivate an account or contact


1. From the menu on the left, go to Accounts or Contacts.
2. Select the active account or contact that you want to deactivate, on the command bar select Deactivate, and
then confirm the deactivation.

Activate an account or contact


1. From the menu on the left, go to Accounts or Contacts.
2. Go to the System Views list.
3. Select Inactive Accounts or Inactive Contacts.
4. Select the inactive accounts or contacts you want to activate.
5. Select Activate, and then confirm the activation.
Track your progress with dashboards and charts
11/18/2018 • 2 minutes to read • Edit Online

Dashboards take a collection of app data and provide insights to show key performance indicators (KPI) and other
important data in easy-to-read interactive charts and graphs. Dashboards are available for all record types.

To see a different dashboard layout, select the down arrow next to the name of the dashboard, and then
select the layout you want.
To choose a default dashboard, display the dashboard you want, and then select Set as Default at the top
of the screen.

Create a new dashboard


1. To create a new dashboard, select Create a Dynamics 365 Dashboard.
2. Choose a dashboard layout and select Create.

3. Type in a name for the dashboard.


4. Add what you want to each area of your dashboard. For example, let's add a chart.

5. Select the Record Type for the chart.


6. Select a View that the data in the chart will display.
7. Choose the chart and then select Add.
8. Continue adding components to the dashboard and when you are done, select Save.
The dashboard that you created will appear in the drop-down menu of available dashboards.
Use charts
Charts provide you with a quick view of how you’re tracking to your goals. They’re also interactive, so you can click
or tap an area of a chart to get more info.
Hover your mouse over the chart to see a tooltip that provides quick information about that area of the
chart.
Click on the area of a chart to see a grid view with more details about the data in the chart.
To expand a chart, select the Expand Chart button.
To view records in the chart or refresh the chart, select and then choose an action: Refresh or View
Records.

Change the chart view


Changing the chart view shows you a different breakdown of your data, such as opportunities opened within a
specific time period. You can change a chart view by selecting the View selector on the Grid page.
For example, choose "All Opportunities," then select a different view, and both chart and grid will get refreshed.
Search for records in an app
11/18/2018 • 2 minutes to read • Edit Online

You can search for records across multiple entities by using Relevance search or Categorized search in model-
driven apps. Relevance search delivers fast and comprehensive results across multiple entities, in a single list,
sorted by relevance. Categorized search returns search results grouped by entity types, such as accounts, contacts
or leads.
Normally, Categorized search is the default search option. However, if Relevance search is enabled by your
organization, it becomes the default search experience.
Normal quick find (Categorized search)
Begins with: Results include records that begin with a specific word. For example, if you want to search for
“Alpine Ski House,” type alp in the search box; if you type ski, the record won’t show up.
Wildcard: For example, *ski or *ski*
Relevance search
Search within: Results include records that contain a field with all of the words in the search term. The
individual words can appear anywhere in the string and in any order. For example, if you search for “Alpine Ski
House,” you could find results for “I left the house today to go skiing in the Alpine Meadows,” since all of the
search words appear somewhere in the string.

Switch between Relevance and Categorized search


If your organization has turned on both search options (Relevance and Categorized search), then you can switch
between the two.
1. To switch between search types, on the navigation bar, select the Search button.
2. On the left, select the drop-down menu to switch between Relevance Search or Categorized Search.

Start a search
1. From the top nav bar, select Search.
2. Type your search words in the search box and then select Search.

Filter search results


To filter results by one record type, on the search screen, choose a record type from the Filter with: drop-
down box.
To search against all record types, choose None in the Filter with: drop-down box.
Create, edit, or save an Advanced Find search
11/18/2018 • 2 minutes to read • Edit Online

Find the records you want in your app by using the Advanced Find search option. You can also use Advanced Find
to prepare data for export to Office Excel so that you analyze, summarize, or aggregate data, or create PivotTables
to view your data from different perspectives.
1. On the command bar, click the Advanced Find button.
2. Specify what to search for.
a. In the Look for list, select a record type.
b. Click Select to define search criteria: field (for example, Account Name or City), the query relational
operator (part of an expression such as "is equal to" or "contains" that defines how a specified
attribute should be compared with a value.), and the values to locate (for example, "Seattle" or
"Email").
You can select fields from the current record type, or from related records. For example, an account
might have many related contact records.
At the bottom of the Select list, the Related section shows related record types. For example, most
record types have a related Notes record type. To select fields from a related record type, select field
and a new Select link appears.
3. Specify the columns to include in the search results.
a. Select Edit Columns, and then select Add Columns.
b. Select the record type that includes the columns you want to add.
c. Select the columns you want to add, and then select OK.
4. Specify the sort order.
a. Select Edit Columns.
b. Select Configure Sorting.
c. Specify the column to sort on, specify the sort order, and then select OK.
d. Select OK.
5. Select Results.
Import data
3/26/2019 • 2 minutes to read • Edit Online

Whether your data is stored in a spreadsheet, on your phone, or in an email program, here’s how to import the
data to your app. For example, you might want to import your customer contact list from an Excel spreadsheet into
the app so you can keep track of all your customer information in one place.

Step 1: Get your import file ready


First, export your data into an Excel file. These file formats are supported:
Excel workbook (.xlsx)
Comma-separated values (.csv)
The maximum file size allowed for .zip files is 32 MB. For the other file formats, the maximum file size allowed is 8
MB.
Export data from an email program
1. Export your data into a comma-separated values file (.csv).
To find specific steps to export contacts from your email program, open the program’s Help, and search for
“export.” Look for topics that include “exporting contacts” or “exporting your address book” or “export
wizard” in the title.
2. Save the file in a location where you can easily find it later.
Export data from a spreadsheet
1. Open the spreadsheet.
2. If necessary, edit any column name in the spreadsheet to exactly match the corresponding name shown
here.

WARNING
If the spreadsheet doesn’t include all the column names listed, that’s OK. However, if a column name does exist, it
must match exactly with the corresponding name in the list or the import won’t work. Spaces are required. Note that
the word “Email” doesn’t contain a hyphen.

COLUMN NAME IN SPREADSHEET (SPELLING MUST MATCH EXACTLY)

First Name

Middle Name

Last Name

Business Phone

Mobile Phone
COLUMN NAME IN SPREADSHEET (SPELLING MUST MATCH EXACTLY)

Job Title

Business Street

Business City

Business State

Business Postal Code

Business Country/Region

Email Address

3. Save the file.


Export data from your phone
Use a USB cable or an app to export your data such as contacts from your phone to your computer.
To find specific steps to export contacts for your brand of phone, search for “export contacts from my phone” in
your favorite search engine (like Bing).
To find an app, search your phone’s online store.

Step 2: Import the file


1. On the command bar, select Import from Excel or Import from CSV.

2. Browse to the folder where you saved the file that contains the export of your contacts. Select the file, select
Open, and then select Next.

TIP
You can import only one file at a time. To bring in more files, run the wizard again later.

3. Review the file name and verify that the field and data delimiters are correct using the Review Mapping
option. If everything looks good, select Finish Import.

Step 3: Check that the import is successful


After the wizard finishes, check your data (for example, list of contacts) to make sure they imported correctly.
1. From the main menu, go to Contacts.
2. Scroll through the contact list. Check that each person is listed and verify the contents of the fields for
accuracy.
Import double-byte characters
If you are importing data that includes double-byte characters for east asian languages, make sure the file is
encoded as UTF -8 BOM. Plain UTF -8 may not be enough.
1. Open the CSV file using Visual Studio Code.
2. In the bottom bar, click the label UTF-8 (pop-up opens).
3. Select Save with encoding.
You can now pick UTF -8 BOM encoding for that file.
Export your data to Excel Online
11/18/2018 • 2 minutes to read • Edit Online

You can quickly do an ad-hoc analysis of your data that is in your app by exporting the data from the app to Excel
Online.
When you make changes to your data in Excel Online, you can save the updated information in the app. Remember
to keep the existing format of the Excel cells to prevent problems during import. Any information added to the
spreadsheet, such as graphs, charts, or colors, will not be saved.

Prerequisites
This feature requires that you have an Office 365 subscription or a subscription to an online service such as
SharePoint Online or Exchange Online.
You need a Microsoft account.

Open app data in Excel Online


The option to open data in Excel Online isn’t available in all record types. If you don’t see the option, it’s not
available for that record.

NOTE
Updated data in an app won’t immediately be reflected in Excel Online if the same view was opened in the last two minutes in
Excel Online. After that time frame, any updated data should show in Excel Online.

To open a list of records in an app, on the command bar select the Export to Excel menu and then select Open in
Excel Online.

Save your data and import it back to the app


1. Once you are done making any changes, select Save.

NOTE
The data for ad-hoc analysis with Excel Online is stored temporarily. Any additions, such as charts, calculations,
and columns, won’t be saved back to the app from the ad-hoc analysis in Excel Online.
The file import might fail if you make a lot of changes. If you need to make a lot of changes to your data and
import it back to the app, it’s recommended that you export the worksheet in Excel instead.
By design, you can’t do a File > Save As in Excel Online. If you do, you’ll get a Can’t Save Workbook error
message.
2. On the Data Submitted for Import dialog box, select Close.
Export data to Excel
6/21/2019 • 2 minutes to read • Edit Online

Do you need to analyze your data from and convert that data into actionable items that help you drive more sales?
Now you can do this when you export your data to Excel or Excel Online. Also, analyzing large datasets is not a
problem because you can export up to 100,000 rows of data.
You can choose to export static worksheets or dynamic worksheets, which you can import back in to the app. If you
need more advanced functions, you can export a dynamic PivotTable, which makes it very easy to organize and
summarize data.
You can export data to a standard Excel file that you can use on any device such as your phone, tablet, or desktop
computer. The data is exported in the same format that you see in the app. Text will remain text, numbers will
remain numbers, and dates will remain dates. However, when you export data from the app to Excel, some cell
formats might change. The following table summarizes how you’ll see the data in apps and how the cell format
changes when you export the data to Excel.

Cell format when data is exported from model-driven apps


DATA FORMAT IN MODEL-DRIVEN APPS CELL FORMAT IN EXCEL

Text, Ticker Symbol, Phone, Options set, and Look Up Shows as Text and option set becomes drop-down list

Email, URL Shows as General

Number Shows as Number without group separator

Currency Shows as Number and does not include dollar sign ($)

Date only, Date and Time Shows as Date only

Calculated and Roll-up fields Editable in Excel but can’t be imported back to PowerApps

Secured fields Editable in Excel but can’t be imported back to PowerApps

See which type of export works best for you


TASK LEARN MORE

Do an ad-hoc or what if analysis without modifying app data. Export to Excel Online
Or, quick bulk edit to multiple records.

Get a snapshot of the data at the current data and time or Export to an Excel static worksheet
you want to share it with others.

Get the most up-to-date information and be able to refresh it Export to an Excel dynamic worksheet
in Excel and match what you see in the app at any time.

View app data in a pivot table. Export to an Excel PivotTable


When you export data in Excel (.xlsx format) and then add or modify columns, you can’t import the data back into
Dynamics 365. This is not supported for the .xlsx file format.
If you’re using Excel 2010, you might get this error message when you export data from the Accounts area:
The file is corrupt and cannot be opened.

The error message occurs due to a setting in Excel. To fix the issue, do this:
1. Open Excel 2010.
2. Go to File > Options.
3. Go to Trust Center > Trust Center settings.
4. Select Protected view and then clear the check boxes for the first two options.
5. Select OK and then close the Options dialog box.
Export to an Excel dynamic worksheet
11/18/2018 • 2 minutes to read • Edit Online

Export your app data to an Office Excel worksheet so users can have the latest information. Imagine the CEO of
your company getting the critical information they need without having to navigate in an app, but instead merely
opening the Excel link on their desktop. You can export up to 100,000 records at a time.

Export data to an Excel dynamic worksheet


You can’t export data to a dynamic worksheet in Excel for all record types. If you don’t see the option, it’s not
available for that record.
1. Open a list of records in the app and select the arrow to the right of Export to Excel.
2. Select Dynamic Worksheet.
3. In the Select Columns for Dynamic Excel dialog box, select the column settings and then select Export.
4. Select Save and then save the .xlsx file. Make note of the location where you saved the file.

NOTE
If you’re going to edit the data file later, it’s recommended that you save the file before you open it. Otherwise, you
might get this error message: Excel cannot open or save any more documents because there is not enough
available memory or disk space.
To fix the issue:
1. Open Excel and go to File > Options > Trust Center Settings Center Settings > Protected View.
2. In Protected View, clear all three items.
3. Select OK > OK.
We still strongly recommend that you save and then open the data file rather than disabling protected view, which
might put your computer at risk.

5. Open Excel and then open the .xlsx file you saved in the previous step.
6. If you see the security warning External Data Connections have been disabled, select Enable Content.
7. To refresh data in the file, on the Data tab, select Refresh from PowerApps.

NOTE
If you have a phone number that starts with + or – (for example +1-123-456-7890), when you refresh the dynamic
worksheet, the phone number field will not display the number correctly.
To avoid the issue, use a space or parentheses (), like this: +1 123-456-7890 or +1 (123)-456-7890.

Tips
You can email a dynamic Excel file or store it as a shared file if the recipients are in the same domain as you.
When recipients open the dynamic file, they’ll see data they have permission to view in the app, so the data
they see may be different from what you see.
Some system views, such as Accounts: No Campaign Activities in Last 3 Months, can be exported only to a
static Excel worksheet.
In PowerApps, currency values are exported to Excel as numbers. To format the data as currency after you
have completed the export, see the Excel Help topic titled “Display numbers as currency."
The date and time values that you see in the app show up only as Date when you export the file to Excel, but
the cell actually shows both the date and time.
If you’re going to make changes and import the data file back into the app, remember that secured,
calculated, and composite fields (such as Full Name) are read-only and can’t be imported into the app. You’ll
be able to edit these fields in Excel, but when you import the data back into the app, these fields will not be
updated. If you want to update these fields, such as a contact’s name, then it’s recommended that you use
that view to export your data, update it in Excel, and import it back to the app for changes.
Export to an Excel static worksheet
11/18/2018 • 2 minutes to read • Edit Online

When you want to present information about the data in your app to an individual who doesn’t have access to the
app, or you have data that doesn’t change often, consider exporting the app data to an Office Excel static
worksheet.
You can export up to 100,000 records at a time. By default, a model-driven app lists up to 50 records per page.
Choose the Page arrows at the bottom of the list to view any additional pages.

Export data to an Excel static worksheet


You may have the option to export data to an Excel static worksheet in all record types. However, in some cases the
format might be legacy, or the data might not be filtered by what you see in the app.
1. Open a list of records in the app, select the arrow to the right of Export to Excel, and then choose Static
worksheet (Page only).
2. By default, an exported worksheet includes the fields that are displayed in the list, using the same field order,
sorting, and field widths. To make changes to the columns in an Advanced Find View, choose Edit
Columns.
3. Choose Save and then save the .xlsx file. Make note of the location where you saved the file.

NOTE
If you’re going to edit the data file later, it’s recommended that you save the file before you open it. Otherwise, you
might get this error message: Excel cannot open or save any more documents because there is not enough
available memory or disk space.
To fix the issue do this:
1. Open Excel and go to File > Options > Trust Center > Settings Center Settings > Protected View.
2. In Protected View, clear all three items.
3. Select OK > OK.
We still strongly recommend that you save and then open the data file rather than disabling protected view, which
might put your computer at risk.

4. Open Excel and then open the .xlsx file you saved in the previous step.
By default, an exported worksheet includes the fields that are displayed in the list, using the same field order,
sorting, and field widths.

Tips
You can email a static exported worksheet to anyone or store it in a shared file. Anyone who opens the file
will see all the data in the file.
You can’t change the columns for a system view, such as All Active Accounts. You must either customize
the view, which requires the System Administrator or System Customizer security role, or use Advanced
Find to create your own view based on the current view.
In model-driven apps, currency values are exported to Excel as numbers. Ater you have completed the
export, see the Excel Help topic “Display numbers as currency" to format the data as currency.
The date and time values that you see in the app show up only as Date when you export the file to Excel, but
the cell actually shows both the date and time.
If you’re going to make changes and import the data file back into the app, remember that secured,
calculated, and composite fields (such as Full Name) are read-only and can’t be imported into the app. You’ll
be able to edit these fields in Excel but when you import the data back into the app, these fields will not be
updated. If you want to update these fields, such as a contact’s name, then it’s recommended that you use
that view to export your data, update it in Excel, and import it back to the app for changes.
Export to an Excel PivotTable
11/18/2018 • 2 minutes to read • Edit Online

You can export app data to an Office Excel PivotTable to see patterns and trends in data. An Excel PivotTable is a
great way to summarize, analyze, explore, and present your app data. You can export up to 100,000 records at a
time.

Export data to an Excel PivotTable


The option to export data to an Excel PivotTable isn’t available in all record types. If you don’t see the option, it’s
not available for that record.
1. Open a list of records in your app, select the arrow to the right of Export to Excel, and then select
Dynamic PivotTable.
2. In the Select Columns for Pivot Excel dialog box, select the column settings and then select Export.
By default, the PivotTable Field List includes only fields that are displayed in the Select Columns for
Pivot Excel list.
3. Select Save and then save the .xlsx file. Make note of the location where you saved the file.

NOTE
If you’re going to edit the data file later, it’s recommended that you save the file before you open it. Otherwise, you
might get this error message: Excel cannot open or save any more documents because there is not enough
available memory or disk space.
To fix the issue:
1. Open Excel and go to File > Options > Trust Center.
2. Select Trust Center Settings and then select Protected View.
3. Under Protected View, clear the check boxes for all three items.
4. Select OK > OK.
We still strongly recommend that you save and then open the data file rather than disabling protected view, which
might put your computer at risk.

4. Open Excel and then open the .xlsx file you saved in the previous step.
5. If you see the security warning External Data Connections have been disabled, select Enable Content.
6. To refresh data in the file, on the Data tab, select Refresh from PowerApps.
7. Drag the fields from the PivotTable Field List to the PivotTable. For more information, see Excel Help.

Tips
In PowerApps, currency values are exported to Excel as numbers. After you complete the export, see the
Excel Help topic “Display numbers as currency" to format the data as currency.
The date and time values that you see in the app show up only as Date when you export the file to Excel, but
the cell actually shows both the date and time.
If you’re going to make changes and import the data file back into the app, remember that secured,
calculated, and composite fields (such as Full Name) are read-only and can’t be imported into the app. You’ll
be able to edit these fields in Excel, but when you import the data back into the app, these fields won’t be
updated. If you want to update these fields, such as a contact’s name, it’s recommended that you use that
view to export your data, update it in Excel, and import it back to the app for changes.
Work with reports
6/28/2019 • 2 minutes to read • Edit Online

Reports help you monitor your progress towards your business goals by helping you see how you’re doing. You
can also track trends - which can give you an advantage over your competitors.
For more information on organizing and creating reports, see: Customize and organize reports.

Run a report
1. From the left navigation pane, select the reports area.
2. Choose the report you want > Run Report.

NOTE
In Report Viewer dialog box, you can leave the search criteria as is, or change it as needed.

Share a report with other users or teams


1. From the left navigation pane, select the reports area.
2. In the list of reports, select the report you want to share.
3. On the command bar, select Share.

4. On the Share Report dialog box, select Add User/Team.


5. In the Look Up Records dialog box, find the users or team record that you want to share the report with,
and select the check box next to the record.
6. Choose Select to add the user or team record to the Selected records box and then select Add.

7. In the Share Report dialog box, select the type of share access that you want. The available permissions
are: Read, Write, Delete, Append, Assign, or Share. This will add the user or team record to the Selected
records box.
Share a report with your organization (for admins)
If the report would be useful for all users, make it available to the organization.
1. From the left navigation pane, select the reports area.
2. In the list of reports, select the report you want to share.
3. On the command bar, select select Edit.
4. On the Actions menu, select Make Report Available to Organization.

Download a report
1. From the left navigation pane, select the reports area.
2. In the list of reports, select the report you want to share.
3. On the command bar, select select Edit.
4. On the Actions menu, select Download Report.
The RDL file contains the fetchXML that the report is based on.
5. Open the report once the download is complete.
See Also
Create a report using the Report Wizard
Add a existing report
Edit report filter
Troubleshoot problems with data not displaying in a report
Create a report using the Report Wizard
6/27/2019 • 2 minutes to read • Edit Online

Use the Report Wizard to create reports with charts and tables that allow you to easily analyze your data.
All reports that are created using the Report Wizard are Fetch-based reports. Note that all reports generated with
the Report Wizard print in landscape mode.

Create a new report


1. From the left navigation pane, select the reports area.
2. On the command bar select New.

3. A Report:New Report screen will appear. For Report Type leave the default selection to, Report Wizard
Report and select the Report Wizard button.
4. In the next screen, leave the default selections and then select Next.

5. On the Report Properties screen, enter a name for the report and then choose the record to include in the
report and then select Next.
6. On the Select Records to Include in the Report screen choose the filters to determine which records are
included in your report. For example, if you only want to see results for records modified in the last 60 days,
you can set that filter in this screen. If you don’t want the data filtered, select Clear.

7. On the Lay out Fields screen, choose the layout of your report. Select Click here to add a grouping and
choose how you want your data grouped.
8. Select the Record type and the Column for the data you want to have grouped in the report. When you
are done with your selections, select OK.

9. Select Click here to add a column to columns of data related to the record type you chose in the previous
step.
10. On the Add Column screen choose the data you want to have displayed for the column and then select
OK.

11. Repeat the previous step for any additional columns that you want to add. When you are done, on the Lay
Out Fields screen, slect Next.
12. On the Format Report screen choose how to format your report and then select Next.

13. Review the summary of your report and select Next and then select Finish. You can now see this report in
the list of report in the system.
See Also
Work with reports
Add a existing report
Edit report filter
Troubleshoot problems with data not displaying in a report
Add a report from outside PowerApps
6/27/2019 • 2 minutes to read • Edit Online

If you’ve created a custom report outside of the system, you can easily add it to PowerApps.
For information about how to create a custom report, see Reporting and Analytics Guide.
1. From the left navigation pane, select the reports area.
2. On the command bar select New.
Add a file created in another application
a. In the Source section, in the Report Type box, select Existing File.

b. In the File Location box, enter the path and file name of the file to add, or choose Browse to locate
the file.
You can can upload many other file types such as an excel file but for this to run like a SQL Server
Reporting Services report or Report Wizard created report, the file needs to be an .RDL file. For
more information, see Report writing environment using SQL Server Data Tools.
-OR
Add a link to a webpage
a. In the Source section, in the Report Type box, select Link to Webpage.
b. In the Webpage URL box, enter the URL of the webpage.
3. Specify the properties for the report.
a. In the Details section, specify a meaningful name and description for the report.
b. The Parent Report text box displays the parent report of the current report, if one exists.
c. Categories. Choose the Select or change the values for this field button, and then specify
the categories to include in this report.
d. Related Record Types. To have the report appear in the Reports list on a page for specific record
types, choose the Select or change the values for this field button, and then select record
types.
e. Display In. To specify where reports should be visible, choose the Select or change the values for
this field button, and then select one or more of the options.
If no values are selected, the report won’t be visible to end users.
4. Choose Save or Save and Close.
See Also
Work with reports
Create a report using the Report Wizard
Edit report filter
Troubleshoot problems with data not displaying in a report
Edit the default filter of a report
6/27/2019 • 2 minutes to read • Edit Online

When a report is a SQL Server Reporting Services report, is enabled for prefiltering, and has a default filter, you
can change the default filter to display the data you expect to see in the report. This filter is used each time any
user runs the report.
1. From the left navigation pane, select the reports area
2. Choose a report and on the commbar bar, select Edit Default Filter.

3. Modify the filter criteria.


The criteria are grouped by record types that you can use in the filter, such as Accounts or Contacts.
To edit an existing row
a. Select the query relational operator and select an operator, or Select the underlined value and enter
a new value.
b. Select the query relational operator, and select an operator.
To add a criteria row:
a. Select Select, and specify the field to filter on.
b. Select the query relational operator, and select an operator.
c. Select Enter Value, and enter a value to filter on. For some values, you can select the Select or
change the values for this field button to open the Select Values dialog box and select the
value you want.
To group criteria
You must select two or more rows for the same record type. However, rows with field values from different
record types, such as Account and Contact record types, cannot be grouped.
a. For each row you want to group, in detailed mode, select the Options menu button for that row,
and then choose Select Row.
b. On the Filter toolbar, select Group AND or Group OR.
c. To remove a row from a group, select the Options menu button for that row, and then select
Delete.
d. To select a group, select the Options menu button for that group, and then select Select Group.
e. To add a criteria clause to a group, select the Options menu button for that group, select Add
Clause, and then select the field, query relational operator, and value.
f. To unselect a group that has been previously selected, select the Options menu button for that
group, and then select Deselect Group.
g. To ungroup a group, select the Options menu button for that group, and then select Ungroup.
h. To change a Group AND group to a Group OR group, or a Group OR group to a Group AND
group, select the Options menu button for that group, and then select Change to OR or Change
to AND.

TIP
To clear all criteria and start over, on the Filter toolbar, select Clear, and then select Confirm.
To delete a row, select the Options menu button for that row, and then select Delete.

4. When you are done, select Save Default Filter.


See Also
Work with reports
Create a report using the Report Wizard
Add a existing report
Troubleshoot problems with data not displaying in a report
Troubleshoot problems with data not displaying in a
report
6/27/2019 • 2 minutes to read • Edit Online

There are several possible reasons why data that you expect to be in a report does not appear:
Insufficient security permissions. If you don't have permission in Common Data Service to view a
record, it will not appear in the report.
Data is not entered. The person entering data may have left fields empty.
Data does not match the criteria for the report. Many reports include a default filter that displays only
active records, or you may have selected criteria that don’t have any matching record. Try changing the
report filter. For more information, see Edit the default filter of a report
You may be viewing a cached copy of the report. By default, data in Common Data Service reports is
pulled from the database each time you run a report. However, your system administrator may have
changed a report to run from the cache. If data you entered recently is not included in the report, you may
have an older version of the report from the cache. To refresh the report, on the Report toolbar, select the
Refresh button.
You may not have permission to read records in a sub-report. If you do not have permission to read
record types that are included in a sub-report, you will get an error message saying that the sub-report
could not be displayed.
Your Microsoft Internet Explorer privacy settings may block required cookies. For chart reports, if
instead of seeing the chart, you see a red letter X, your privacy settings may be blocking a cookie that is
required for the chart control. To fix this problem, in your browser, enable cookies for the server that is
running Reporting Services.
See Also
Work with reports
Create a report using the Report Wizard
Add a existing report
Edit report filter
Work with business processes
3/2/2019 • 2 minutes to read • Edit Online

Business process flows provide a guide for users to get their work done efficiently. They help you enter data
consistently and follow the same steps every time you work with a record.
For exmaple, as you work on a new customer record, the business process flow helps you see each step that you
need to take to create the new record and fill out the required information according to your organizations
business process.
The process bar can be docked to the right side of the screen for easy reference as you work with a customer
record.

For more information on how to create and manage business process flows, see Business process flows overview.

What if your business processes looks different from these examples?


The system comes with business processes for common tasks. However, most organizations customize these
processes to match the way they do things. Or, you might have added processes to the system that have been
customized for your industry or business goals. In other words, what you see here may not exactly match the
process bars you see on your system. But regardless, the process bars work the same for everyone. You enter data
in the fields, and then move the customer to the next stage.
Use Microsoft Flow to automate processes
6/28/2019 • 2 minutes to read • Edit Online

Microsoft Flow lets you create automated processes between your favorite apps and services. From within your
app, you can run a Flow on one or more records.
Also, you can open Microsoft Flow from your app to view, edit, or create new flows. More information: Get started
with Microsoft Flow

Manage your flows


Connect with Microsoft Flow from your app to manage your flows.

NOTE
To manage and run Microsoft Flow from your app, Microsoft Flow must be enabled in System Settings for you organization.
More information: Flows in your organization

1. On the command bar, select Flow.

2. The following options appear:


Select Create a flow to open a new browser tab and direct you to the Microsoft Flow site. On the
Microsoft Flow page, select Continue to use an existing template or X to close, choose, or create a
different one.
Select See your flows to open a new browser tab and direct you to the Microsoft Flow site where
any flows in the Flow environment are displayed.
Select Login to flow to connect with Microsoft Flow and display available flows for you to run. This
only appears if you aren’t currently signed in to Microsoft Flow.
For information about creating a flow, see Get started with Microsoft Flow
Use Dynamics 365 App for Outlook
6/19/2019 • 2 minutes to read • Edit Online

Use the Dynamics 365 App for Outlook to manage your Dynamics 365 data using Outlook on the desktop, web, or
phone. When Dynamics 365 App for Outlook is installed, depending on which version of the app you have
installed, you'll see a Common Data Service pane or window next to a selected Outlook email message, or when
you're composing an email message or setting up a meeting or appointment.

What Dynamics 365 App for Outlook offers?


With Dynamics 365 App for Outlook, you can:
View information about Common Data Service contacts and accounts while you’re working in Outlook. You
can view this info in the context of an email message, meeting, or appointment. For example, view phone
numbers, company name, last and next activities, and recent records.
Link email messages, meetings, and appointments to a record with a single click. For example, link an email
message to a specific account or contact. Dynamics 365 App for Outlook also supports custom entities.
Open records directly to find or enter more detailed information.
Add a phone call, task, or appointment activity.
Create a new record for any entity (record type).
Track Outlook contacts in Common Data Service.
For information on using Dynamics 365 App for Outlook, see Dynamics 365 App for Outlook User Guide.
See also
Customize Dynamics 365 App for Outlook
Overview of creating apps in PowerApps
7/18/2019 • 2 minutes to read • Edit Online

PowerApps is a high-productivity development platform for business apps, and it has four major components:
Canvas apps start with your user experience, crafting a highly tailored interface with the power of a blank
canvas and connecting it to your choice of 200 data sources. You can build canvas apps for web, mobile, and
tablet applications.
Model-driven apps start with your data model – building up from the shape of your core business data and
processes in the Common Data Service to model forms, views, and other components. Model-driven apps
automatically generate great UI that is responsive across devices.
Portals start to create external-facing websites that allow users outside your organization to sign in with a wide
variety of identities, create and view data in Common Data Service, or even browse content anonymously.
Common Data Service is the data platform that comes with PowerApps and allows you to store and model
business data. It's the platform on which Dynamics 365 applications are built; if you’re a Dynamics customer,
your data is already in the Common Data Service.
It's easy and simple to try building out your first app. We have a 30-day trial plan and a free community plan; find
out which one is best for you and get started.

Canvas apps
Canvas apps give you the flexibility to arrange the user experience and interface the way you want it. Allow your
creativity and business sense to guide how you want your apps to look and feel.
You can start to build your app from Microsoft tools where your data lives, such as:
From a SharePoint list
From a Power BI dashboard
Creating a canvas app is easy; with PowerApps, you can find or create your app in several ways:
From data
From a sample
From a Common Data Service source
From a blank canvas
Via AppSource

Model-driven apps
When you create a model-driven app, you can use all of the power of the Common Data Service to rapidly
configure your forms, business rules, and process flows. You create a model-driven app from the PowerApps site.
Getting started with model-driven apps is simple, and you can begin with these topics:
Create an app
Create and design forms
Create or edit views
Create or edit a system chart
Create or edit dashboards
Add security
Add business logic

Common Data Service


The Common Data Service allows you to securely store and manage data within a set of standard and custom
entities, and you can add fields to those entities when you need them.
Getting started with the Common Data Service is easy. For example, you can start with these items:
Create a custom entity
Manage fields
Create custom option sets
Create a business rule

Canvas and model-driven artifacts


While we merge the experiences of canvas and model-driven apps, these artifacts will be relevant for either canvas
apps or model-driven apps.

ARTIFACT APP TYPE

Entity > Views Model-driven

Entity > Forms Model-driven

Entity > Dashboards Model-driven

Connections Canvas

Gateways Canvas

Custom connectors Canvas

Apps > Import Canvas

After you build your app, you can share it with your team members.
Sign in to PowerApps for the first time
3/22/2019 • 3 minutes to read • Edit Online

When you sign in to PowerApps, the site offers you a variety of options for creating your own apps, opening apps
that you or others have created, and performing related tasks. These tasks range from the most simple, such as
identifying the license or licenses that give you access, to more advanced capabilities, such as creating custom
connections to specific data sources.
You can select options in three general areas:
the header along the top of the page

the navigation bar along the left edge of the page

the large icons that feature prominently in the middle of the page

For best results, start by ensuring that the home page is set to the right environment.

Choose an environment
Whether you're creating an app, a flow, a data connection, or an entity in Common Data Service, much of what you
do in PowerApps is contained in a specific environment. Environments create boundaries between different types
of work; for example, an organization might have separate environments for different departments. Many
organizations use environments to separate apps that are still being developed from those that are ready for
widespread use. You might have access to multiple environments or only one and, if you have appropriate
permissions, you might be able to create your own environments.
To verify which environment you're in, find the environment switcher near the right side of the header.

If you create an app in one environment, you won't be able to see it from another environment. In addition, people
who want to run your app must have access to the environment in which you created it.

IMPORTANT
Make sure that you're in the right environment before you create an app, a flow, or a similar component. You can't easily
move components from one environment to another.

For more information, see Environments overview.

Choose an app type


In PowerApps, you can create and run these types of apps:
Canvas apps support designing custom UI and connecting to data from a variety of sources.
Model-driven apps have a standard UI and connect to data only in Common Data Service. However, you can
more easily create other elements such as views, dashboards, and different types of business logic.
If you choose an environment that has a Common Data Service database, you can build canvas or model-driven
apps from the same Home page.

Play or edit an app


If you've created an app (or someone else has created one and shared it with you), you can play or edit it from the
Home page or the Apps page.
On the Apps page, you can filter the list of apps based on criteria such as whether you opened it recently.

You can also search for an app by typing one or more characters in the search bar, which appears near the upper-
right corner. When you find the app you want, select the banner icon to play or edit the app.

Create an app
From the Home page, you can create apps in several ways:
generate a canvas app automatically from a set of data
customize a pre-built sample of a canvas app
build a canvas app from a blank screen
create your own model-driven app
customize a pre-built sample for a model-driven app

Learn more
You can find more information about either canvas apps or model-driven apps in two ways:
In the left navigation bar, select Learn.
In the header, select the question-mark icon.

Both options show links to this documentation set, the PowerApps Community (where you can share information
with users in other organizations), and the PowerApps blog (where the newest features are announced).

Other common tasks


By selecting options in the header and left navigation bar, you can do more than create and open apps.
From the header
Select the down arrow to download mobile and other clients in which you can run apps.
For more information, see Find and run apps.
Select the gear icon to perform tasks such as connecting to data sources, identifying your PowerApps license
or licenses, and opening the page where you can perform administrative tasks.
For more information, see these topics:
Overview of canvas-app connectors
Build and certify custom connectors for canvas apps
Manage an on-premises data gateway
Administer PowerApps
Licensing overview
Overview of building a model-driven app
From the left navigation bar
Extend the functionality of your apps by performing these tasks:
Manage entities, option sets, and data integration in Common Data Service.
Configure business logic in Microsoft Flow.
Author, package, and maintain solutions.
What are canvas apps in PowerApps?
3/22/2019 • 2 minutes to read • Edit Online

Design and build a business app from a canvas in Microsoft PowerApps without writing code in a traditional
programming language such as C#. Design the app by dragging and dropping elements onto a canvas, just as you
would design a slide in PowerPoint. Create Excel-like expressions for specifying logic and working with data. Build
apps that integrate business data from a wide variety of Microsoft and third-party sources. Share your app so that
users can run it in a browser or on a mobile device, and embed your app so that users can run it in SharePoint,
Power BI, or Teams.
If you don't need a custom design and your data is in Common Data Service, you can automatically generate a
model-driven app from your business data and processes. This type of app can model forms, views, and other
components, and the default UI automatically adjusts to phones, laptops, and other devices. For more information
about this type of app, see Overview of building a model-driven app.

Build an app
To get started, automatically generate an app from one of these sources, among others:
a sample app
a template
Common Data Service
SharePoint
Excel
Sign in to PowerApps, and then select Start from data or a sample app, such as Service Desk or Budget
Tracker.

After you generate an app automatically, customize its default appearance and behavior based on your users'
workflows. For example, change which types of data appear, how they're sorted, or even whether users specify a
number by typing it or adjusting a slider. Add and customize screens, galleries, forms, and other controls.
After you've generated an app or two automatically and gained some experience with customization, create an app
from scratch based on Common Data Service, Excel, or another data source. By working from the ground up, you
gain flexibility in app design, flow, and controls, and you can incorporate a larger variety of data sources.
Share and run an app
When you finish the app and save it to the cloud, share it with others in your organization. Specify which users or
groups can run the app and whether they can also customize and share it with additional people in the
organization.
Run your own apps - and any apps shared with you - on Windows, in a web browser, or on an iOS or Android
device.

Learn more
Explore the step-by-step, conceptual, and reference topics in the navigation pane on the left.
Check out the webinars that you can access on-demand to help you leverage the features and functions of
PowerApps.
Review coding standards for maximizing app performance and keeping apps easier to maintain.

Share your experience


Read and post in the PowerApps Community, where anyone who uses PowerApps can post a question and
others can answer. Before you post a question, search the community to see whether your question has already
been answered.
Submit an idea for how we can improve PowerApps in PowerApps Ideas.
Create a support ticket to get technical assistance. If you're a PowerApps administrator for your organization,
you can also open a support ticket in the PowerApps admin center.

Next steps
Sign up for a free license.
Sign in to PowerApps.
Open a sample app.
System requirements, limits, and configuration values
for canvas apps
8/15/2019 • 2 minutes to read • Edit Online

This topic contains device platform and web browser requirements, as well as limits and configuration values for
PowerApps.

Supported platforms for running canvas apps using the PowerApps


app
MINIMUM REQUIRED RECOMMENDED

iOS 9.3 or later iOS 10 or later with at least 2GB of RAM

Android 5 or later Android 7 or later with at least 4GB of RAM

Windows 8.1 or later (PC only) Windows 10 Fall Creators Update with at least 8 GB of RAM)

Supported browsers for running canvas apps


BROWSER OPERATING SYSTEM

Google Chrome (latest version) Windows 7 SP1, 8.1, and 10


(recommended) Android 5 or later
iOS 8 or later
macOS

Microsoft Edge (latest version) Windows 10


(recommended)

Microsoft Internet Explorer 11 (with Compatibility View off) Windows 7 SP1, 8.1, and 10

Mozilla Firefox (latest version) Windows 7 SP1, 8.1, and 10


Android 5 or later
iOS 8 or later
macOS

Apple Safari (latest version) iOS 8 or later


macOS

Supported browsers for PowerApps Studio


BROWSER OPERATING SYSTEM

Google Chrome (latest version) Windows 7 SP1, 8.1, and 10


(recommended) macOS
BROWSER OPERATING SYSTEM

Microsoft Edge (latest version) Windows 10


(recommended)

Microsoft Internet Explorer 11 (with Compatibility View off) Windows 7 SP1, 8.1, and 10

Request limits
These limits apply to each single outgoing request:

NAME LIMIT

Timeout 180 Seconds

Retry attempts 4

NOTE
The retry value may vary. For certain error conditions, it's not necessary to retry.

IP addresses
Requests from PowerApps use IP addresses that depend on the region of the environment that the app is in. We
don't publish fully qualified domain names available for PowerApps scenarios.
Calls made from an API connected through an app (for example, the SQL API or the SharePoint API) come from
the IP address specified later in this topic.
You should use these addresses if, for example, you must whitelist IP addresses for an Azure SQL database.

IMPORTANT
If you have existing configurations, please update them as soon as possible before September 30, 2018 so they include and
match the IP addresses in this list for the regions where your PowerApps apps exist.

REGION OUTBOUND IP

Asia 13.75.36.64 - 13.75.36.79, 13.67.8.240 - 13.67.8.255,


52.175.23.169, 52.187.68.19

Australia 13.70.72.192 - 13.70.72.207, 13.72.243.10, 13.77.50.240 -


13.77.50.255, 13.70.136.174

Brazil 191.233.203.192 - 191.233.203.207, 104.214.19.48 -


104.214.19.63, 13.65.86.57, 104.41.59.51

Canada 13.71.170.208 - 13.71.170.223, 13.71.170.224 -


13.71.170.239, 52.237.24.126, 40.69.106.240 -
40.69.106.255, 52.242.35.152

Europe 13.69.227.208 - 13.69.227.223, 52.178.150.68, 13.69.64.208


- 13.69.64.223, 52.174.88.118, 137.117.161.181
REGION OUTBOUND IP

India 104.211.81.192 - 104.211.81.207, 52.172.211.12,


40.78.194.240 - 40.78.194.255, 13.71.125.22,
104.211.146.224 - 104.211.146.239, 104.211.189.218

Japan 13.78.108.0 - 13.78.108.15, 13.71.153.19, 40.74.100.224 -


40.74.100.239, 104.215.61.248

South America 191.233.203.192 - 191.233.203.207, 104.214.19.48 -


104.214.19.63, 13.65.86.57, 104.41.59.51

United Kingdom 51.140.148.0 - 51.140.148.15, 51.140.80.51, 51.140.211.0 -


51.140.211.15, 51.141.47.105

United States 13.89.171.80 - 13.89.171.95, 52.173.245.164, 40.71.11.80 -


40.71.11.95, 40.71.249.205, 40.70.146.208 - 40.70.146.223,
52.232.188.154, 52.162.107.160 - 52.162.107.175,
52.162.242.161, 40.112.243.160 - 40.112.243.175,
104.42.122.49

United States (Early Access) 13.71.195.32 - 13.71.195.47, 52.161.102.22, 13.66.140.128 -


13.66.140.143, 52.183.78.157

Required services
This list identifies all services to which PowerApps Studio talks and their usages. Your network must not block
these services.

DOMAIN(S) PROTOCOLS USES

management.azure.com https RP

msmanaged-na.azure-apim.net https Runtime of Connectors/Apis

login.microsoft.com https ADAL


login.windows.net
login.microsoftonline.com
secure.aadcdn.microsoftonline-p.com

graph.microsoft.com https Azure Graph - For getting user info


graph.windows.net (e.g., profile photo)

gallery.azure.com https Sample and Template apps

*.azure-apim.net https Api Hubs - Different sub-domains for


each locale

*.powerapps.com https create.powerapps.com,


make.powerapps.com,
content.powerapps.com, and
web.powerapps.com
DOMAIN(S) PROTOCOLS USES

*.azureedge.net https create.powerapps.com,


make.powerapps.com,
content.powerapps.com, and
web.powerapps.com

*.blob.core.windows.net https Blob storage

*.flow.microsoft.com https create.powerapps.com,


make.powerapps.com,
content.powerapps.com, and
web.powerapps.com

vortex.data.microsoft.com https Telemetry

localhost https PowerApps Mobile

NOTE
If you're using a VPN, it must be configured to exclude localhost from tunneling for PowerApps Mobile.

Size limits
You can find information about size limits on text, hyperlinks, images, and media in Data types.
Keyboard shortcuts for canvas apps
5/28/2019 • 2 minutes to read • Edit Online

NOTE
Shortcuts might vary based on keyboard layout.

File
SHORTCUT ACTION

Ctrl+O (or Alt+F) Open a file.

Ctrl+Shift+S (or Alt+P) Save the app with a different name.

Ctrl+S Save the app with the same name or for the first time.

F12 Download the app file (.msapp).

Alt+F Open the File menu.

Ribbon
SHORTCUT ACTION

Enter Run the selected command.

Tab Move between commands on the selected tab and then to the
next tab.

Ctrl+F6 Navigate to the next landmark.

Ctrl+Shift+F6 Navigate to the previous landmark.

Alt+I Select the Insert tab.

Editing
SHORTCUT ACTION

Ctrl+A Select all.

Ctrl+X Cut.

Ctrl+C Copy.
SHORTCUT ACTION

Ctrl+V Paste.

Ctrl+Z Undo command.

Ctrl+Y Redo command.

Ctrl+M Add a screen.

Ctrl+= or Ctrl+Shift+= Zoom in.

Ctrl+- or Ctrl+Shift+- Zoom out.

Ctrl+0 Fit canvas to page.

Shift+Enter Break a line in a formula.

Preview
SHORTCUT ACTION

F5 Open Preview mode.

Esc Close Preview mode, a dialog box, or a flyout pane.

Canvas
SHORTCUT ACTION

Tab Select the next control.

Ctrl+Click or Shift+Click Select multiple objects at once.

Right arrow Nudge the selected control to the right.

Left arrow Nudge the selected control to the left.

Up arrow Nudge the selected control up.

Down arrow Nudge the selected control down.

Tree view
NOTE
These shortcuts require the Tree view pane to have focus.
SHORTCUT ACTION

F2 Rename a control.

Esc Cancel renaming a control.

Ctrl+G Group/ungroup controls.

Ctrl+] Bring a control forward.

Ctrl+[ Send a control backward.

Ctrl+Shift+] Bring to front.

Ctrl+Shift+[ Send to back.

Resize
SHORTCUT ACTION

Shift+Left arrow Decrease width.

Ctrl+Shift+Left arrow Decrease width slightly.

Shift+Down arrow Decrease height.

Ctrl+Shift+Down arrow Decrease height slightly.

Shift+Right arrow Increase width.

Ctrl+Shift+Right arrow Increase width slightly.

Shift+Up arrow Increase height.

Ctrl+Shift+Up arrow Increase height slightly.

Text format
SHORTCUT ACTION

Ctrl+B Cycle through levels of bold.

Ctrl+I Turn italic on or off.

Ctrl+U Add or remove underline.

Other
SHORTCUT ACTION

F1 Open documentation.

Shift+F10 Open a shortcut menu in, for example, Tree view.

Alt or Ctrl+Shift Hide design elements so that you can interact with controls as
if the app were running.
Create a canvas app from a sample in PowerApps
5/11/2019 • 2 minutes to read • Edit Online

In this quickstart, you'll create a canvas app from a sample so that you can explore design possibilities and
discover concepts that you can apply as you develop your own canvas apps.
Each sample showcases a real-world scenario but uses fictitious data. To store this data, you'll need a cloud-
storage account, such as Dropbox, Google Drive, or OneDrive.
If you don't have a license for PowerApps, you can sign up for free.

Open a sample app


1. Sign in to PowerApps.
2. In the list of sample apps, hover over a sample app (such as Cost Estimator) with your mouse.

3. Click or tap the phone icon to create a version of the app for mobile devices (or leave the tablet icon
selected), and then click or tap Make this app.
4. In PowerApps Studio, click or tap Make my own app in the banner near the top-center of the screen.

5. Specify the cloud-storage account where you want to store the fictitious data for this app, and then provide
credentials for that account.
6. Open Preview mode by pressing F5 (or by clicking or tapping the play button near the upper-right corner).
Each sample represents a different scenario with a variety of screens and other controls. If you opened the
Cost Estimator sample, you can use the default app to perform these tasks:
Create an appointment for estimating the cost of installing a flooring product in a room of a particular
size.
Capture details such as address and square footage, and calculate the price based on discounts and tax
rates.
Filter a list of appointments to show those for which estimates have been created, for which estimates
haven't been created, or all appointments.
7. When you finish exploring the app, close Preview mode by pressing Esc (or by clicking or tapping the close
icon near the upper-right corner, under the title bar for PowerApps).

Save the app


1. Near the upper-left corner, click or tap the File tab.
2. In the App settings page, review the default settings.

3. Near the left edge, click or tap Save.

Next steps
In this quickstart, you created your own app based on a sample that uses fictitious data stored in your cloud
account. For more help learning how to create an app, you can also automatically generate an app based on data
in other sources such as Common Data Service, SharePoint, or Excel.
Generate an app
Install and configure the Expense Report sample for
canvas apps in PowerApps
5/10/2019 • 8 minutes to read • Edit Online

Step-by-step instructions for installing and configuring the Expense Report sample. You can also preview the
sample app here.
Estimated time to complete these steps: 10-15 minutes

TIP
Watch this video for a demonstration of how to use the Expense Report sample app.

Track expense reports from submission to approval. Tally line items as individual expenses accrue and submit for
approval when ready. This app requires a small amount of setup to make it your own.

TIP
Watch this video to see how to use the Expense Report sample.

Prerequisites
Sign up for PowerApps.

Create the Expenses list


This list stores the expense reports.
1. Open a web browser, and navigate to https://admin.microsoft.com.
2. Log in with an account that has permission to create lists.
3. Navigate to the site collection where you want the Expenses list to reside.
4. Click the gear icon in the top right portion of the web page.
5. Click Add an app.
6. In the Find an app textbox, enter Custom.
7. Click the search icon.
8. Click the Custom List app.
9. In the Name textbox, enter Expenses.

IMPORTANT
If you choose a different name for the list, make sure you write it down because you will need to substitute it for
Expenses everywhere you see it during the installation and configuration process.

10. Click Create.


Create Cost Center column
1. Click the Expenses list.
2. Click the gear icon in the top right portion of the web page.
3. Click List settings.
4. Click Create column.
5. In the Column name textbox enter Cost Center.
6. In the type of information in this column is radio button list, select Choice.
7. In the Type each choice on a separate line textbox, enter the following values, each on a separate line:
Microsoft
Contoso
8. In the Default value textbox, enter Microsoft.
9. Click OK.
Create Comments column
1. Click Create column.
2. In the Column name textbox, enter Comments.
3. In the type of information in this column is radio button list, select Multiple lines of text.
4. Click OK.
Create Status column
1. Click the Expenses list.
2. Click the gear icon in the top right portion of the web page.
3. Click List settings.
4. Click Create column.
5. In the Column name textbox enter Status.
6. In the type of information in this column is radio button list, select Choice.
7. In the Type each choice on a separate line textbox, enter the following values, each on a separate line:
Open
Pending
Approved
8. In the Default value textbox, enter Open.
9. Click OK.
Create ApproverName column
1. Click Create column.
2. In the Column name textbox, enter ApproverName.
3. In the type of information in this column is radio button list, select Person or Group.
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.
Create DateSubmitted column
1. Click Create column.
2. In the Column name textbox, enter DateSubmitted.
3. In the type of information in this column is radio button list, select Date and Time.
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.
Create StartDate column
1. Click Create column.
2. In the Column name textbox, enter StartDate.
3. In the type of information in this column is radio button list, select Date and Time.
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.
Create EndDate column
1. Click Create column.
2. In the Column name textbox, enter EndDate.
3. In the type of information in this column is radio button list, select Date and Time.
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.

Create the LineItems list


This list stores the line items that are associated with each expense report.
1. Navigate to the same site collection where you created the Expenses list.
2. Click the gear icon in the top right portion of the web page.
3. Click Add an app.
4. In the Find an app textbox, enter Custom.
5. Click the search icon.
6. Click the Custom List app.
7. In the Name textbox, enter LineItems.
IMPORTANT
If you choose a different name for the list, make sure you write it down because you will need to substitute it for
LineItems everywhere you see it during the installation and configuration process.

8. Click Create.
Create Category column
1. Click the LineItems list.
2. Click the gear icon in the top right portion of the web page.
3. Click List settings.
4. Click Create column.
5. In the Column name textbox enter Category.
6. In the type of information in this column is radio button list, select Choice.
7. In the Type each choice on a separate line textbox enter the following values, each on a separate line:
Food & Beverage
Transportation
Business needs
8. In the Default value textbox, enter Food & Beverage.
9. Click OK.
Create Cost column
1. Click Create column.
2. In the Column name textbox enter Cost.
3. In the type of information in this column is radio button list, select Number (1, 10, 100).
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.
Create Date column
1. Click Create column.
2. In the Column name textbox enter Date.
3. In the type of information in this column is radio button list, select Date and Time.
4. In the Require that this column contains information radio button list, select Yes.
5. Click OK.
Create Description column
1. Click Create column.
2. In the Column name textbox enter Description.
3. In the type of information in this column is radio button list, select Multiple lines of text.
4. In the Require that this column contains information radio button list, select Yes.
5. In the Specify the type of text to allow radio button list, select Plain text.
6. Click OK.
Create ReportID column
1. Click Create column.
2. In the Column name textbox enter ReportID.
3. In the type of information in this column is radio button list, select Lookup (information already on this
site).
4. In the Require that this column contains information radio button list, select Yes.
5. In the Get information from dropdown list, select the Expense list you created.
6. In the In this column dropdown list, select ID.
7. Click OK.
Edit Title column
1. Click the Title column link.
2. In the Require that this column contains information radio button list, select No.
3. Click OK.

Download the Expense Report app


1. In a web browser, navigate to the following link:
http://pappsfeprodwestuscontent.blob.core.windows.net/sampleapps/myexpenses/docs/MyExpenses(SP_Li
st).zip.
2. Download the Expense Report PowerApps Sample package, and save it to your machine.

Create connections
1. In a web browser, navigate to web.powerapps.com.
2. Sign in by providing the same credentials that you used to sign up.
3. In the menu on the left, select Connections.
Create an Approvals connection
1. Click + New connection.
2. In the Search textbox, enter Approvals.
3. Select Approvals in the list.
4. Click Create.
Create an Office 365 Outlook connection
1. Click + New connection.
2. In the Search textbox, enter Office 365 Outlook.
3. Select Office 365 Outlook in the list.
4. Click Create.
5. In the popup window, select the account you logged in with.
Create a SharePoint connection
1. Click + New connection.
2. In the Search textbox, enter SharePoint.
3. Select SharePoint in the list.
4. Click Create.
5. In the popup window, select the account you logged in with.

Import the app


1. In a web browser, navigate to https://web.powerapps.com.
2. Sign in by providing the same credentials that you used to sign up.
3. In left navigation bar, select Apps, and then select Import package(preview).
4. Select Upload, and then select the package that you downloaded earlier.
5. For the App and Flow resource types, set IMPORT SETUP to Create as new.
6. For the SharePoint and Outlook connections, set IMPORT SETUP to Select during import.

7. Select the red icon for the SharePoint Connection.


8. In the connections list, select the item with your username.

9. Select Save.
10. Select the red icon for the Approval Connection.
11. In the connections list, select the item with your username.
12. Select Save.
13. Select the red icon for the Office 365 Outlook Connection.
14. In the connections list, select the item with your username.

15. Select Save.

TIP
When you're done, it will look like this:
16. Select Import, and then wait until the process is complete.

Configure the app to use the SharePoint lists


1. In the web browser, select Apps.
2. Select the ellipsis (...) next to the Expense Report app.
3. Select Edit on the web > Allow.
Delete connections
1. On the View tab, select Data sources.
2. In the Data pane, select the ellipsis (...) next to Expenses, and then select Remove.
3. Repeat the previous step to remove the LineItems data source.
Expenses list
1. On the View tab, select Data sources.
2. In the Data pane, select Add data source > New connection > SharePoint > Create.
3. In the Recent sites list, select the SharePoint site where you created the Expenses list.

TIP
If the site doesn't appear in the list, type or paste the URL to the SharePoint site in the textbox, and then select Go.

4. In the Search box at the top of the list, type or paste Expenses.
5. Select the checkbox next to Expenses, and then select Connect.
LineItems list
1. On the View tab, select Data sources.
2. In the Data pane, select SharePoint.
3. In the Recent sites list, select the SharePoint site where you created the LineItems list.

TIP
If the site doesn't appear in the list, type or paste the URL to the SharePoint site in the textbox, and then select Go.

4. In the Search box at the top of the list, type or paste Line Items.
5. Select the checkbox next to LineItems, and then select Connect.
6. Select File > Save > Publish > Publish this version.

Modify the flow


1. In left navigation bar, select Flows.
2. If prompted to sign in, provide the same credentials that you used to sign up.
3. Near the top of the screen, select My flows.
4. Next to the ApproveExpense flow, select the pencil icon.

5. Expand the Get items action.


6. Change the Site Address and List Name to match the Expenses list that you created in SharePoint.

TIP
You don’t need to type it manually; you can select it in the drop-down lists.

7. Expand the Condition.


8. Expand the If yes section.
9. Expand the Change item status to Approved action.
10. Change the Site Address and List Name to match the Expenses list that you created in SharePoint.
TIP
You don’t need to type it manually; you can select it in the drop-down lists.

11. Expand the If no section.


12. Expand the Change item status to Open action.
13. Change the Site Address and List Name to match the Expenses list that you created in SharePoint.

TIP
You don’t need to type it manually; you can select it in the drop-down lists.

14. Select Update flow.

Play the app


1. In the web browser, select Apps.
2. Select the ellipsis (...) next to the Expense Report app, and then select Open.

Next steps
Customize a SharePoint list form
Add and configure a control
Edit and manage permissions for a SharePoint list or library
Install and configure the Help Desk sample in
PowerApps
5/10/2019 • 6 minutes to read • Edit Online

Step-by-step instructions for, in PowerApps, installing and configuring the Help Desk sample for canvas apps.
Estimated time to complete these steps: 10-15 minutes

TIP
For a demonstration of this process, please watch this video.

Overview of the sample


Help Desk provides a user-friendly experience to connect end users with support professionals. Quickly find
answers to your most important questions, track progress of open tickets, and review details of previous requests.
This app requires a small amount of setup to make it your own.

TIP
Watch this video to see how to use the Help Desk PowerApp Sample.

Prerequisites
Sign up for PowerApps.
Must have a valid SharePoint Online license and permission to create lists.
Create the HelpDesk SharePoint list
This list stores the Help Desk tickets.
1. Open a web browser and navigate to https://admin.microsoft.com.
2. Log in with an account that has permission to create SharePoint lists.
3. Navigate to the site collection where you want the HelpDesk list to reside.
4. Click the gear icon in the top right portion of the web page.
5. Click Add an app.
6. In the Find an app textbox, enter Custom.
7. Click the search icon.
8. Click the Custom List app.
9. In the Name textbox, enter HelpDesk.

IMPORTANT
If you choose a different name for the list make sure you write it down because you will need to substitute it for
HelpDesk everywhere you see it during the installation and configuration process.

10. Click Create.


Create Description column
1. Select the ellipsis next to the HelpDesk list and click Settings.
2. Click Create column.
3. In the Column name textbox enter Description.
4. In the type of information in this column is radio button list, select Multiple lines of text.
5. In the Require that this column contains information radio button list, select Yes.
6. In the Specify the type of text to allow radio button list, select Plain text.
7. Click OK.
Create Category column
1. Click Create column.
2. In the Column name textbox enter Category.
3. In the type of information in this column is radio button list, select Choice.
4. In the Type each choice on a separate line textbox enter the following values, each on a separate line:
LAPTOP / PC equipment issue
LAPTOP / PC software issue
5. In the Enforce unique values radio button list, select No.
6. In the Display choices using radio button list, select Drop-Down Menu.
7. In the Default value textbox, enter LAPTOP / PC equipment issue.
8. Click OK.
Create PercentComplete column
1. Click Create column.
2. In the Column name textbox enter PercentComplete.
3. In the type of information in this column is radio button list, select Number (1, 10, 100).
4. In the Require that this column contains information radio button list, select No.
5. Click OK.
Create Priority column
1. Click Create column.
2. In the Column name textbox enter Priority.
3. In the type of information in this column is radio button list, select Choice.
4. In the Type each choice on a separate line textbox enter the following values, each on a separate line:
HIGH
MEDIUM
LOW
5. In the Enforce unique values radio button list, select No.
6. In the Display choices using radio button list, select Drop-Down Menu.
7. In the Default value textbox, enter LOW.
8. Click OK.
Create TaskStatus column
1. Click Create column.
2. In the Column name textbox enter TaskStatus.
3. In the type of information in this column is radio button list, select Choice.
4. In the Type each choice on a separate line textbox enter the following values, each on a separate line:
NOT STARTED
IN PROGRESS
COMPLETED
DEFERRED
WAITING ON CSR
5. In the Enforce unique values radio button list, select No.
6. In the Display choices using radio button list, select Drop-Down Menu.
7. In the Default value textbox, enter NOT STARTED.
8. Click OK.
Create AssignedTo column
1. Click Create column.
2. In the Column name textbox enter AssignedTo.
3. In the type of information in this column is radio button list, select Person or Group.
4. In the Require that this column contains information radio button list, select No.
5. In the Allow multiple selections radio button list, select NO.
6. Click OK.
Edit 'Title' column
1. Click the Title column link.
2. In the Require that this column contains information radio button list, select No.
3. Click OK.

Download the app


1. Download the PowerApps package and save it to your machine.

Create connections
1. In a web browser, navigate to web.powerapps.com.
2. Sign in by providing the same credentials that you used to sign up.
3. In the menu on the left, select Data then Connections.
Create Office 365 Outlook connection
1. Click + New connection.
2. In the Search textbox, enter Office 365 Outlook.
3. Select Office 365 Outlook in the list.
4. Click Create.
5. In the popup window, select the account you logged in with.
Create SharePoint connection
1. Click + New connection.
2. In the Search textbox, enter SharePoint.
3. Select SharePoint in the list.
4. Click Create.
5. In the popup window, select the account you logged in with.
Create Office 365 Users connection
1. Click + New connection.
2. In the Search textbox, enter office 365 users.
3. Select Office 365 Users in the list.
4. Click Create.
5. In the popup window, select the account you logged in with.

Import the app


1. In a web browser, navigate to https://web.powerapps.com.
2. Sign in by providing the same credentials that you used to sign up.
3. In the menu on the left, select Apps.
4. Click Import package(preview).

5. Click the Upload button and select the PowerApp package you downloaded in previous steps.
6. For the App and Flow resource types, set IMPORT SETUP to Create as new.
7. For the SharePoint and Outlook connections, set IMPORT SETUP to Select during import.
8. Click the red icon for the SharePoint Connection.
9. In the connections list, click the item with your username.

10. Click Save.


11. Click the red icon for the Office 365 Outlook Connection.
12. In the connections list, click the item with your username.
13. Click Save.

TIP
When you are done, it will look like this.

14. Click Import and wait until the process is complete.

Configure the app to use the SharePoint list


1. Under Next steps, click Open app.
2. Click Allow when prompted for permission.
Delete connections
1. On the View tab, select Data sources.
2. In the Data pane, select the ellipsis (...) next to HelpDesk, and then select Remove.
HelpDesk list
1. On the View tab, select Data sources.
2. In the Data pane, select Add data source > New connection > SharePoint > Create.
3. In the Recent sites list, select the SharePoint site where you created the HelpDesk List.

TIP
If the site doesn't appear in the list, type or paste the URL to the SharePoint site in the textbox, and then select Go.

4. In the Search box at the top of the list, type or paste HelpDesk.
5. Select the checkbox next to HelpDesk, and then select Connect.
Update admin list
1. Select the LoginScreen.
2. Select OnStart in the dropdown.
3. Expand the formula window and find the AdminList collection.
4. Replace [email protected] with your HelpDesk administrator(s).
TIP
If you have more than one administrator, use a comma to delimit the list of administrators. Example:
"[email protected]","[email protected]". To ensure the addresses in the AdminList match the format
PowerApps expects, select View > Variables > Global > MyProfile and look at the 'Mail' column to see the expected
email format.

5. Select File > Save > Publish > Publish this version.

Modify the flow


1. In the menu on the left, click Flows.
2. If prompted to sign in, sign in by providing the same credentials that you used to sign up.
3. Select My flows in the top menu.
4. Next to the HelpDeskFlow Flow, click the pencil icon.

5. Expand the Get items action.


6. Change the Site Address and List Name to match the HelpDesk SharePoint list you created.

TIP
You don’t need to type it manually, you can choose it in the dropdown lists.

7. Expand the Switch.


8. Expand the NOT STARTED case.
9. Expand the Case not started action.
10. Change the To to match the HelpDesk admin email.
11. Click Update flow.

Play the app


1. In the web browser, click Apps.
2. Click the ellipsis (...) next to the Help Desk app.
3. Click Open.

TIP
Watch this video to see how to use the Help Desk PowerApp Sample.

Next steps
Customize a SharePoint list form
Add and configure a control
Edit and manage permissions for a SharePoint list or library
Set up and learn about the Meeting Capture sample
template in PowerApps
2/20/2019 • 2 minutes to read • Edit Online

Overview
In PowerApps, the Meeting Capture sample template is an all-in-one tool for capturing information from meetings
as they happen. If you run the app, you can view meeting details, capture notes, take pictures of whiteboards, draw
sketches and assign tasks. You can also export all of these items, send them to all meeting attendees, and schedule
followup meetings quickly and easily.

Where can I run the app?


You can run this sample app in your browser, on a tablet, or other device that has a similar form factor.

How do I open the template and run the app?


Preview Meeting Capture or watch these videos to find out more:
How to open the template.
How to run the app from start to finish.

How do I build the app myself?


Meeting Capture includes a lot of functionality commonly used in PowerApps. By watching these videos, you can
explore this functionality and find out how to implement it so you can implement the same functionality and
patterns in your own apps.
Export content from PowerApps to OneNote.
Find available meeting times for attendees.
Meeting Capture connects to these services in Office 365.
Office 365 Users
Office 365 Outlook
Planner
OneNote (Business)
Content Conversion
We hope you enjoy exploring Meeting Capture, and we look forward to hearing how you extend it for your
organization!

Next steps
Formula reference
Controls reference
Generate a canvas app from Common Data Service
in PowerApps
4/17/2019 • 2 minutes to read • Edit Online

In PowerApps, automatically generate a canvas app based on a list of sample accounts in Common Data Service.
In this app, you can browse all accounts, show details of a single account, and create, update, or delete an
account.
If you're not signed up for PowerApps, sign up for free before you start.

Prerequisites
To follow this quickstart, you must be assigned to the Environment Maker security role, and you must switch to
an environment in which a database in Common Data Service has been created, contains data, and allows
updates. If no such environment exists and you have administrative privileges, you can create an environment
that meets this requirement.

Generate an app
1. Sign in to PowerApps and, if necessary, switch environments as specified earlier in this topic.
2. Under Make your own app, hover over Start from data, and then select Make this app.

3. On the Common Data Service tile, select Phone layout.

4. Under Choose a table, select Accounts, and then select Connect.


5. If the Welcome to PowerApps Studio dialog box appears, select Skip.
Your app opens to the browse screen, which shows a list of accounts in a control called a gallery. Near the top of
the screen, a title bar shows icons for refreshing the data in the gallery, sorting the data in the gallery
alphabetically, and adding data to the gallery. Under the title bar, a search box provides the option to filter the
data in the gallery based on text that you type or paste.
By default, the gallery shows an email address, a city, and an account name. As you'll see in Next steps, you can
customize the gallery to change how the data appears and even show other types of data.

Save the app


You'll probably want to make more changes before you use this app or share it with others. As a best practice,
save your work so far before you proceed.
1. Near the upper-left corner, select the File tab.
2. In the App settings page, set the app name to AppGen, change the background color to deep red, and
change the icon to a checkmark.

3. Near the left edge, select Save and then, in the lower-left corner, select Save.

Next steps
In this quickstart, you created an app to manage sample data about accounts in Common Data Service. As a next
step, customize the gallery and other elements of the default browse screen to better suit your needs.
Customize a gallery.
Generate a canvas app in PowerApps from a
SharePoint list
3/19/2019 • 3 minutes to read • Edit Online

In this topic, you'll use PowerApps to automatically generate a canvas app based on items in a SharePoint list. You
can generate the app from within PowerApps or SharePoint Online. From within PowerApps, you can generate
the app based on a list in an on-premises SharePoint site if you connect to it through a data gateway.
The app that you generate will contain three screens:
In the browse screen, you can scroll through all items in the list.
In the details screen, you can show all information about a single item in the list.
In the edit screen, you can create an item or update information about an existing item.
You can apply the concepts and techniques in this topic to any list in SharePoint. To follow the steps exactly:
1. In a SharePoint Online site, create a list named SimpleApp.
2. In a column named Title, create entries for Vanilla, Chocolate, and Strawberry.
The principles of generating an app won't change even if you create a list that's far more complex, with many
columns of various types such as text, dates, numbers, and currency.

IMPORTANT
PowerApps doesn't support all types of SharePoint data. For more information, see Known issues.

Generate an app from within PowerApps


1. Sign in to PowerApps.
2. Under Make your own app, hover over Start from data, and then select Make this app.

3. On the SharePoint tile, select Phone layout.


4. With the Connect directly option selected, select Create.

5. Under Connect to a SharePoint site, type or paste the URL for your SharePoint Online site, and then
select Go.
Include only the site URL (not the name of the list), as in this example:
https://microsoft.sharepoint.com/teams/Contoso

6. Under Choose a list, select SimpleApp, and then select Connect.


After a few minutes, your app opens to the browse screen, which shows the items that you created in your
list. If your list has data in more columns than just Title, the app will show that data. Near the top of the
screen, a title bar shows icons for refreshing the list, sorting the list, and creating an item in the list. Under
the title bar, a search box provides the option to filter the list based on text that you type or paste.

You'll probably want to make more changes before you use this app or share it with others. As a best
practice, save your work so far by pressing Ctrl-S before you proceed. Give your app a name, and then
select Save.

Generate an app from within SharePoint Online


If you create an app of a custom list from the SharePoint Online command bar, the app appears as a view of that
list. You can also run the app on an iOS or Android device, in addition to a web browser.
1. In SharePoint Online, open a custom list, select PowerApps on the command bar, and then select Create
an app.

2. In the panel that appears, type a name for your app, and then select Create.

A new tab appears in your web browser that shows the app that you automatically generated based on
your SharePoint list. The app appears in PowerApps Studio, where you can customize it.

3. (optional) Refresh the browser tab for your SharePoint list (by selecting it and then, for example, pressing
F5), and then follow these steps to run or manage your app:
To run the app (in a separate browser tab), select Open.
To let others in your organization run the app, select Make this view public.
To let others to edit your app, share it with Can edit permissions.
To remove the view from SharePoint, select Remove this view.
To remove the app from PowerApps, delete the app.
Next steps
In this topic, you created an app to manage data in a SharePoint list. As a next step, generate an app from a more
complex list, and then customize the app (starting with the browse screen) to better suit your needs.
Customize a default browse screen
Generate a canvas app from Excel in PowerApps
1/14/2019 • 2 minutes to read • Edit Online

In this topic, you'll automatically generate your first canvas app in PowerApps using data from an Excel table.
You'll select an Excel file, generate an app, and then run the app that you generate. Every generated app includes
screens to browse records, show record details, and create or update records. By generating an app, you can
quickly get a working app using Excel data, and then you can customize the app to better suit your needs.
The Excel file must be in a cloud-storage account, such as OneDrive, Google Drive, or Dropbox. This topic uses
OneDrive for Business.
If you don't have a license for PowerApps, you can sign up for free.

Prerequisites
To follow this topic exactly, download the Flooring Estimates file in Excel, and save it in your cloud storage
account.

IMPORTANT
You can use your own Excel file, but the data must be formatted as a table. For more information, see Format a table.

Generate the app


1. Sign in to PowerApps.
2. Under Make your own app, hover over Start from data, and then select Make this app.

3. Under Start with your data, click or tap Phone layout on the tile for your cloud-storage account.
4. If prompted, click or tap Connect, and provide your credentials for that account.
5. Under Choose an Excel file, browse to FlooringEstimates.xlsx, and then click or tap it.
6. Under Choose a table, click or tap FlooringEstimates, and then click or tap Connect.

Run the app


1. Open Preview by pressing F5 (or by clicking or tapping the play icon near the upper-right corner).

2. Toggle the sort order by clicking or tapping the sort icon near the upper-right corner.

3. Filter the list by typing or pasting one or more characters in the search box.
For example, type or paste Honey to show the only record for which that string appears in the product's
name, category, or overview.
4. Add a record:
a. Select the plus icon.

b. Add whatever data you want, and then select the checkmark icon to save your changes.

5. Edit a record:
a. Select the arrow for the record that you want to edit.

b. Select the pencil icon.

c. Update one or more fields, and then select the checkmark icon to save your changes.

As an alternative, select the cancel icon to discard your changes.


6. Delete a record:
a. Select the next arrow for the record that you want to delete.

b. Select the trash icon.

Next steps
Customize the default browse screen to better suit your needs. For example, you can sort and filter the list by
product name only, not category or overview.
Customize a default browse screen.
Tutorial: Customize a gallery in PowerApps
3/28/2019 • 4 minutes to read • Edit Online

In this tutorial, you'll customize a list of records, called a gallery, and make other changes in an app that was
generated automatically in Microsoft PowerApps. Users can manage data in the app even if you don't make these
changes, but the app will be easier to use if you customize it for your organization's needs.
For example, the gallery for this tutorial matches this graphic by default. The email address is featured more
prominently than other types of data, and users can sort and filter the gallery based on text in that address:

However, your users might be more interested in the account name more than the email address, so you'll
reconfigure the gallery to highlight, sort, and filter based on the key data for your organization. In addition, you'll
change the title of the default screen to differentiate it from the other screens in the app.

You'll also add a scroll bar so that users who don't have touch screens or mouse wheels can browse the entire
gallery.
Change the layout of the gallery
Change the type of data that appears in the gallery
Change the columns by which users can sort and search the data
Change the screen title
Show a scroll bar
This tutorial starts with an app that was generated from a specific data source. However, the same concepts apply
to any app that you generate in PowerApps, whether from a SharePoint list, an Excel table, or some other data
source.
If you're not signed up for PowerApps, sign up for free before you start.

Prerequisites
Generate an app from the Accounts entity of Common Data Service.

Open the generated app


1. Sign in to PowerApps, and then select Apps near the left edge.
2. Find the app that you generated, select the ellipsis icon (...) for it, and then select Edit.

3. If the Welcome to PowerApps Studio dialog box appears, select Skip.

Change the layout


1. In the left navigation pane, select BrowseGallery1.
When the gallery is selected, a selection box with handles surrounds it.

2. On the Properties tab of the right-hand pane, open the list of options under Layout, and then select the
option that shows only a title.
3. Next to Fields, select Edit, and then select the down arrow for the title box.
The name of this control will end in a numeral, such as Title1, but the numeral might differ based on other
actions you might have taken.
4. In the list of options, select Account name, and then close the Data pane.
The gallery shows the name of each account.

Change sort and search columns


1. Select the gallery as the previous section describes.
2. Near the upper-left corner, confirm that the property list shows Items.

The value of this property appears in the formula bar. You set this property to specify not only the data
source for the gallery but also the columns by which users can sort and search the data.
3. Copy this formula, and then paste it in the formula bar.
SortByColumns(Search(Accounts, TextSearchBox1.Text, "name"), "name", If(SortDescending1, Descending,
Ascending))

By using this formula, you ensure that:


If a user types one or more characters in the search bar, the gallery shows only those account names
that contain the text that the user typed.
If a user selects the sort icon, the gallery is sorted alphabetically by account name in either ascending or
descending order, depending on how many times the user selects the icon.
For more information about these and other functions, see the formula reference.
Test sorting and searching
1. Open Preview mode by pressing F5 (or by selecting the play button near the upper-right corner).

2. Near the upper-right corner of the browse screen, select the sort icon one or more times to change the
alphabetical sort order between ascending and descending.

3. In the search box, type k to show only those account names that contain the letter that you typed.
4. Remove all text from the search bar, and then close Preview mode by pressing Esc (or by selecting the
close icon near the upper-right corner).

Change the screen title


1. Select the title of the screen by clicking or tapping it.

2. Ensure that the property list shows Text and then, in the formula bar, replace Accounts with Browse
(retaining the double quotation marks).

The screen reflects your change.

Show a scrollbar
If your users might have neither touch screens nor mouse wheels, configure the gallery to show a scrollbar when
the user hovers over it with the mouse. That way, users can show all accounts even if the screen can't show them
all at once.
1. Select the gallery as the first procedure describes.
2. Set the gallery's Show scrollbar property to true.

Next steps
In this tutorial, you've customized the gallery and made other changes to the default screen for browsing records
in a generated app. You can also customize the default screens for displaying details and creating or updating
accounts. As the browse screen contains a gallery, the other two screens in the app contain forms. You can
change, for example, which types of data the forms show and in which order.
Customize forms
Customize a canvas-app form in PowerApps
4/2/2019 • 2 minutes to read • Edit Online

In a canvas app, customize a Display form control and an Edit form control so that they show the data that
matters most and in the most intuitive order to help users easily understand and update the data.
Each form comprises one or more cards, each of which shows data from a particular column in the data source. By
following the steps in this topic, you can specify which cards appear in a form and move cards up and down within
a form.
If you're unfamiliar with canvas-pps, see What are canvas apps?.

Prerequisites
Generate an app from the Common Data Service, and then customize the gallery in that app.

Show and hide cards


1. Sign in to PowerApps, and then open the app that you generated and customized.
2. In the left navigation bar, type or paste D in the search bar to filter the list of elements, and then select
DetailForm1.

3. On the Properties tab of the right-hand pane, select Edit fields to open the Fields pane.

4. Hide a field, such as Description, by hovering over it, selecting the ellipsis (...) that appears, and then
selecting Remove.
5. Show a field by selecting Add field, typing or pasting the first few letters of the field's name in the search
box, selecting the field's check box, and then selecting Add.

Reorder the cards


1. In the Fields pane, drag the Account Name field to the top of the list of fields.
The cards in DetailForm1 reflect the change.

2. (optional) Reorder the other cards into this sequence:


Account Name
Number of Employees
Annual Revenue
Main Phone
Address 1: Street 1
Address 1: Street 2
Address 1: City
Address 1: ZIP/Postal Code
3. In the left navigation bar, type or paste Ed in the search bar, and then select EditForm1 to select it.
4. Repeat the steps in the previous procedure and this one so that the fields in EditForm1 match those in
DetailForm1.

Run the app


1. In the left navigation bar, type or paste Br in the search bar, and then select BrowseScreen1 to select it.
2. Open Preview mode by pressing F5 (or by selecting the Preview icon near the upper-right corner).

3. In the upper-right corner, select the plus icon to add a record in EditScreen1.

4. Add whatever data you want, and then select the checkmark icon in the upper-right corner to save your
changes and return to BrowseScreen1.

5. Select the arrow for the item that you just created to show details about that item in DetailScreen1.

6. In the upper-right corner, select the edit icon to update the record in EditScreen1.

7. Change the information in one or more fields, and then select the check mark in the upper-right corner to
save your changes and return to DetailScreen1.

8. Near the upper-right corner, select the trash-can icon to delete the record that you just updated and to
return to BrowseScreen1.

9. Close Preview mode by pressing Esc (or by selecting the close icon near the upper-left corner).

Next steps
Save and publish your app.
Customize a card in your app.
Customize a card in a canvas app
4/2/2019 • 2 minutes to read • Edit Online

Perform basic customization (without unlocking a card) by, for example, changing its control. Perform advanced
customization by unlocking the card and, for example, adding a control that isn't available for that card by default.
For an overview, see Understand data cards.

Prerequisites
Learn how to add and configure controls.
You can review this topic for general concepts only, or you can follow it step by step if you first complete the
procedures in these topics:
1. Generate an app.
2. Customize its gallery.
3. Customize its forms.

Customize a locked card


In this procedure, you'll replace a Text-input control with a [Slider](controls/control-slider.md control without
unlocking the card.
1. In the app that you generated and customized, select EditForm1 in the left navigation bar, and then select
Edit fields on the Properties tab of the right-hand pane.
2. In the list of fields, select the down arrow for Number of Employees, and then open the list under Control
type.

3. Select Edit Slider.


The screen reflects your change.
Unlock and customize a card
In this procedure, you'll unlock a card and update the Max property of the Slider control that you just added.
1. In EditForm1, select the Slider control in the Number of Employees card.

2. On the Advanced tab of the right-hand pane, select the lock icon to unlock the card.

3. Set the Max property of the Slider control to 10,000.


The Slider control shows a more accurate value.

Next steps
Now that you have a basic understanding of how to generate an app and customize a gallery, a form, and a card,
you can build your own app from scratch.
Create a canvas app from scratch using Common
Data Service
8/6/2019 • 4 minutes to read • Edit Online

Build a canvas app to manage data that's stored in Common Data Service, using standard entities (which are
built in), custom entities (which your organization creates), or both.
When you build an app from Common Data Service, you don't need to create a connection from PowerApps, as
you do with data sources such as SharePoint, Dynamics 365, or Salesforce. You need only to specify the entities
that you want to show or manage in the app.

Prerequisites
Before you create an app from scratch, familiarize yourself with PowerApps basics by generating an app and
then customizing that app's gallery, forms, and cards.
Switch to an environment in which a database has been created with sample data. If you have an appropriate
license, you can create an environment to meet this need.
To create an app, you must be assigned to the Environment Maker security role.

Open a blank app


1. Sign in to PowerApps.
2. Under Make your own app, select Canvas app from blank.

3. Specify a name for your app, select Phone, and then select Create.
You can build an app from scratch for tablets, but this topic shows building an app for phones.

Specify an entity
1. In the middle of the screen, select connect to data.
2. In the Data pane, select Common Data Service, select the Accounts check box, and then select
Connect.
3. Close the Data pane by selecting the close icon in the upper-right corner.

Add a list screen


1. On the Home tab, select the down arrow for New screen, and then select List.

2. In the left navigation bar, select BrowseGallery1, and then set the value of the Items property to this
formula:
SortByColumns(Search(Accounts, TextSearchBox1.Text, "name"), "name", If(SortDescending1,
SortOrder.Descending, SortOrder.Ascending))

This formula specifies that:


The gallery should show data from the Accounts entity.
The data should be sorted in ascending order until a user selects the sort button to toggle the sort
order.
If a user types or pastes one or more characters into the search bar (TextSearchBox1), the list will
show only those accounts for which the name field contains the characters that the user specified.
You can use these and many other functions to specify how your app appears and behaves.

3. Set the gallery's layout to show only the name of each account, and configure the title bar to show the
word Browse, as Customize a gallery describes.
4. In the left navigation bar, hover over Screen1, select the ellipsis icon (...), and then select Delete.
5. In the left navigation bar, hover over Screen2, select the ellipsis icon (...), and then select Rename.
6. Type or paste BrowseScreen, and then rename the gallery in that screen as BrowseGallery.

Add a form screen


1. Repeat the first step of the previous procedure, except add a Form screen instead of a List screen.
2. Set the form's DataSource property to Accounts and its Item property to BrowseGallery.Selected, as
the Advanced tab of the right-hand pane shows.

3. On the Properties tab of the right-hand pane, select Edit Fields to open the Fields pane.
4. Select Add field, and then select the check boxes for these fields:
Account Name
Address 1: Street 1
Address 1: City
Address 1: ZIP/Postal code
Number of Employees
Annual Revenue

NOTE
Outside of this scenario, you can create a custom field by selecting New field, providing the required information,
and then selecting Done. More information: Create a field.

5. Select Add.
6. Set the title bar's Text property to show Create/Edit.
The screen reflects your changes.

7. Rename this screen FormScreen.

Configure icons
1. On the BrowseScreen, set the OnSelect property of the circular icon near the top of the screen to this
formula:
Refresh(Accounts)

2. Set the OnSelect property of the plus icon to this formula:


NewForm(EditForm1); Navigate(FormScreen, ScreenTransition.None)
3. Set the OnSelect property of the first arrow pointing to the right to this formula:
EditForm(EditForm1); Navigate(FormScreen, ScreenTransition.None)

4. On the FormScreen, set the OnSelect property of the cancel icon to this formula:
ResetForm(EditForm1);Navigate(BrowseScreen, ScreenTransition.None)

5. Set the OnSelect property of the checkmark icon to this formula:


SubmitForm(EditForm1); Navigate(BrowseScreen, ScreenTransition.None)

6. On the Insert tab, select Icons, and then select the Trash icon.
7. Set the Trash icon's Color property to White and its OnSelect property to this formula:
Remove(Accounts, BrowseGallery.Selected); Navigate(BrowseScreen, ScreenTransition.None)

Test the app


1. In the left navigation bar, select BrowseScreen, and then open Preview by pressing F5 (or by selecting
the play icon near the upper-right corner).

2. Toggle the list between ascending and descending sort orders, and filter the list by one or more
characters in the account name.
3. Add an account, edit the account that you added, start to update the account but cancel your changes,
and then delete the account.

Next steps
Link this app to a solution so that you can, for example, deploy it to a different environment or publish it on
AppSource.
Open one or more sample apps, and explore different types of apps that you can create.
Create a canvas app from scratch based on Excel
data
8/23/2019 • 7 minutes to read • Edit Online

Create your own canvas app from scratch based on Excel data, formatted as a table, and then add data from
other sources if you want. By following this tutorial, you'll create an app that contains two screens. On one
screen, users can browse through a set of records. On the other screen, users can create a record, update one or
more fields in a record, or delete an entire record. This approach takes more time than generating an app
automatically does, but app makers who have more experience can use it to build the best app for their needs.

Prerequisites
To follow the steps in this tutorial exactly, first create an Excel file using this sample data.
1. Copy this data, and then paste it into an Excel file.

STARTDAY STARTTIME VOLUNTEER BACKUP

Saturday 10am-noon Vasquez Kumashiro

Saturday noon-2pm Ice Singhal

Saturday 2pm-4pm Myk Mueller

Sunday 10am-noon Li Adams

Sunday noon-2pm Singh Morgan

Sunday 2pm-4pm Batye Nguyen

2. Format that data as a table, named Schedule, so that PowerApps can parse the information.
For more information, see Format a table in Excel.
3. Save the file under the name eventsignup.xlsx, close it, and then upload it to a cloud-storage account,
such as OneDrive.

IMPORTANT
You can use your own Excel file and review this tutorial for general concepts only. However, the data in the Excel file must
be formatted as a table. For more information, see Format a table in Excel.

Open a blank app


1. Sign in to PowerApps.
2. Under Make your own app, select Canvas app from blank.
3. Specify a name for your app, select Phone, and then select Create.
You can design an app from scratch for phones or for other devices (such as tablets). This topic focuses on
designing an app for phones.

PowerApps Studio creates a blank app for phones.


4. If the Welcome to PowerApps Studio dialog box opens, select Skip.

Connect to data
1. In the middle of the screen, select connect to data.
2. In the Data pane, select the connection for your cloud-storage account if it appears. Otherwise, follow
these steps to add a connection:
a. Select New connection, select the tile for your cloud-storage account, and then select Create.
b. If prompted, provide your credentials for that account.
3. Under Choose an Excel file, type or paste the first letters of eventsignup to filter the list, and then
select the file that you uploaded.
4. Under Choose a table, select the checkbox for Schedule, and then select Connect.
5. In the upper-right corner of the Data pane, close it by selecting the close icon (X).

Create the view screen


1. On the Home tab, select the down-arrow next to New screen to open a list of screen types, and then
select List.
A screen is added with several default controls, such as a search box and a Gallery control. The gallery
covers the entire screen under the search box.
2. At the top of the new screen, select the Label control, and then replace [Title] with View records.

3. In the left navigation bar, select BrowseGallery1.


A selection box with handles surrounds the gallery.
4. On the Properties tab of the right-hand pane, select the down arrow for the Layout menu.

5. Select Title, subtitle, and body.


6. In the formula bar, replace CustomGallerySample with Schedule, and replace both instances of
SampleText with Volunteer.
7. On the right edge of the formula bar, select the down arrow, and then select Format text.
The formula matches this example:

SortByColumns(
Search(
Schedule,
TextSearchBox1.Text,
"Volunteer"
),
"Volunteer",
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)

8. On the Properties tab of the right-hand pane, select Edit next to the Fields label.
9. In the Title2 box, select Volunteer, in the Subtitle2 box, select StartDay, and in the Body1 box, select
StartTime.
10. In the upper-right corner of the Data pane, close it by selecting the close icon (X).
Users can sort and filter the gallery by volunteer name based on the SortByColumns and Search functions in
that formula.
If a user types at least one letter in the search box, the gallery shows only those records for which the
Volunteer field contains the text that the user typed.
If a user selects the sort button (between the refresh button and the plus button in the title bar), the gallery
shows the records in ascending or descending order (depending on how many times the user selects the
button) based on the Volunteer field.
For more information about these and other functions, see the formula reference.

Create the change screen


1. On the Home tab, select the down arrow next to New screen, and then select Form.
2. In the left navigation bar, select EditForm1.
3. On the Properties tab of the right-hand pane, select the down arrow next to Data source, and then select
Schedule in the list that appears.
4. Under the data source that you just specified, select Edit fields.
5. In the Fields pane, select Add field, select the check box for each field, and then select Add.
6. Select the arrow next to the name of each field to collapse it, and then drag the Volunteer field up so that
it appears at the top of the list of fields.

7. In the upper-right corner of the Fields pane, close it by selecting the close icon (X).
8. Set the Item property of the form to this expression by typing or pasting it in the formula bar:
BrowseGallery1.Selected

9. At the top of the screen, select the Label control, and then replace [Title] with Change records.
Delete and rename screens
1. In the left navigation bar, select the ellipsis (...) for Screen1, and then select Delete.

2. Select the ellipsis (...) for Screen2, select Rename, and then type or paste ViewScreen.
3. Select the ellipsis (...) for Screen3, select Rename, and then type or paste ChangeScreen.

Configure icons on the view screen


1. Near the top of the ViewScreen, select the circular-arrow icon.

2. Set the OnSelect property for that icon to this formula:


Refresh(Schedule)

When the user selects this icon, the data from Schedule is refreshed from the Excel file.
For more information about this and other functions, see the formula reference.
3. In the upper-right corner of the ViewScreen, select the plus icon.

4. Set the OnSelect property for that icon to this formula:


NewForm(EditForm1);Navigate(ChangeScreen,ScreenTransition.None)

When the user selects this icon, ChangeScreen appears with each field empty, so that the user can create
a record more easily.
5. Select the right-pointing arrow for the first record in the gallery.

6. Set the OnSelect property for the arrow to this formula:


EditForm(EditForm1); Navigate(ChangeScreen, ScreenTransition.None)

When the user selects this icon, ChangeScreen appears with each field showing the data for the selected
record, so that the user can edit or delete the record more easily.

Configure icons on the change screen


1. On ChangeScreen, select the "X" icon in the upper-left corner.

2. Set the OnSelect property for that icon to this formula:


ResetForm(EditForm1);Navigate(ViewScreen, ScreenTransition.None)

When the user selects this icon, any changes that the user made in this screen are discarded, and the view
screen opens.
3. In the upper-right corner, select the checkmark icon.

4. Set the OnSelect property for the checkmark to this formula:


SubmitForm(EditForm1); Navigate(ViewScreen, ScreenTransition.None)

When the user selects this icon, any changes that the user made is this screen are saved, and the view
screen opens.
5. On the Insert tab, select Icons, and then select the Trash icon.
6. Set the new icon's Color property to White, and move the new icon so it appears next to the checkmark
icon.

7. Set the Visible property for the trash icon to this formula:
EditForm1.Mode = FormMode.Edit

This icon will appear only when the form is in Edit mode, not in New mode.
8. Set the OnSelect property for the trash icon to this formula:
Remove(Schedule, BrowseGallery1.Selected); Navigate(ViewScreen, ScreenTransition.None)

When the user selects this icon, the selected record is deleted from the data source, and the view screen
opens.

Test the app


1. Select the ViewScreen, and then open Preview by pressing F5 (or by selecting the Preview icon near the
upper-right corner).

2. Type or paste one or more letters in the search box to filter the list based on the name of the volunteer.
3. Select the sort icon one or more times to show the data ascending or descending order based on the
name of the volunteer.
4. Add a record.
5. Update the record that you added, and then save the changes.
6. Update the record that you added, and then cancel the changes.
7. Delete the record that you added.
8. Close Preview mode by pressing Esc (or by selecting the close icon in the upper-right corner).

Next steps
Press Ctrl-S to save your app in the cloud so that you can run it from other devices.
Share the app so that other people can run it.
Learn more about functions such as Patch, which you can use to manage data without creating a standard
form.
Link this app to a solution so that you can, for example, deploy it to a different environment or publish it on
AppSource.
Create a canvas app from a template in PowerApps
10/15/2018 • 2 minutes to read • Edit Online

Create a canvas app automatically based on a template for a specific scenario, such as tracking budgets and
scheduling vacations, and then run the app to understand its default behavior.
To create an app from a template, you need a cloud-storage account (such as DropBox, OneDrive, or Google
Drive) to store the template's sample data.
If you don't have a license for PowerApps, you can sign up for free.

Create an app
1. Sign in to PowerApps.
2. Under Make your own app, hover over Start from data, and then click or tap Make this app.

3. On the App templates tile, click or tap Phone layout or Tablet layout.

4. In the list of templates, click or tap a template, and then click or tap Use (near the lower-right corner).
The sample data is copied to your cloud-storage account, the app is created, and its home page appears.

Run the app


An app from a template opens in the default workspace, where you'll spend most of your time customizing. Before
you make any changes to the app, explore how the app works in Preview mode.
1. Press F5 (or click or tap the right arrow in the upper-right corner) to open the app in Preview mode.

The app is populated with sample data to demonstrate the functionality of the app. For example, the Cost
Estimator app contains data for creating appointments and estimating the cost of installing a specific
flooring product in a room of a particular size.
2. Explore the app's default behavior by creating, updating, and deleting sample data, and then verify that the
data in your cloud-storage account reflects your changes.
For example, make an appointment, and create a cost estimate in the Cost Estimator app.
3. Return to the default workspace by pressing Esc (or by clicking or tapping the X icon near the upper-right
corner).

Next steps
1. Press Ctrl-S, give your app a name, and then click or tap Save to save your app to the cloud.
2. Share your app with other people in your organization.

IMPORTANT
Before you share an app, make sure that the people with whom you're sharing it have access to the data. For example, you
must share an Excel or other file in a cloud-storage account.
Overview of canvas-app connectors for PowerApps
7/24/2019 • 3 minutes to read • Edit Online

Data is at the core of most apps, including those you build in PowerApps. Data is stored in a data source, and
you bring that data into your app by creating a connection. The connection uses a specific connector to talk to the
data source. PowerApps has connectors for many popular services and on-premises data sources, including
SharePoint, SQL Server, Office 365, Salesforce, and Twitter. To get started adding data to a canvas app, see Add
a data connection in PowerApps.
A connector may provide tables of data or actions. Some connectors provide only tables, some provide only
actions, and some provide both. Also your connector may be either a standard or custom connector.

Tables
If your connector provides tables, you add your data source and then select the table in the data source that you
want to manage. PowerApps both retrieves table data into your app and updates data in your data source for
you. For example, you can add a data source that contains a table named Lessons and then set the Items
property of a control, such as a gallery or a form, to this value in the formula bar:

You can specify the data that your app retrieves by customizing the Items property of the control that shows
your data. Continuing the previous example, you can sort or filter the data in the Lessons table by using that
name as an argument for the Search and SortByColumn functions. In this graphic, the formula to which the
Items property is set specifies that the data is sorted and filtered based on the text in TextSearchBox1.

For more information about how to customize your formula with tables, see these topics:
Understand data sources in PowerApps
Generate an app from Excel data
Create an app from scratch
Understand tables and records in PowerApps

NOTE
To connect to data in an Excel workbook, it must be hosted in a cloud-storage service such as OneDrive. For more
information, see Connect to cloud-storage from PowerApps.

Actions
If your connector provides actions, you must still select your data source as you did before. Instead of selecting a
table as the next step, however, you manually connect a control to an action by editing the Items property of the
control that will show your data. The formula to which you set the Items property specifies the action that
retrieves data. For example, the app won't retrieve any data if you connect to Yammer and then set the Items
property to the name of the data source. To populate a control with data, specify an action such as
GetMessagesInGroup(5033622).messages.
If you need to handle custom data updates for action connectors, build a formula that includes the Patch
function. In the formula, identify the action and the fields that you'll bind to the action.
For more information about how to customize your formula for custom updates, see these topics:
Patch
Collect
Update

NOTE
PowerApps doesn't work with dynamic schema. The phrase dynamic schema refers to the possibility that the same
action may return a different table with different columns. Conditions that may cause the columns in the tables to differ
include the action input parameters, the user or role that's executing the action, and the group in which the user is
working, among others. For example, SQL Server stored procedures may return different columns if run with different
inputs. For actions with dynamic schema, the connector documentation shows The outputs of this operation are
dynamic. as the return value. In contrast, Microsoft Flow works with dynamic schema and might provide a work-around
for your scenario.

Popular connectors
This table has links to more information about our most popular connectors. For a complete list of connectors,
see All connectors.

Common Data Office 365 Outlook


Service

SharePoint Excel

SQL Server OneDrive for


Business

Dynamics 365 OneDrive

Office 365 Users Dropbox

Standard and custom connectors


PowerApps provides standard connectors for many commonly used data sources, such as those listed above. If
PowerApps has a standard connector for the type of data source that you want to use, you should use that
connector. If you want to connect to other types of data sources, such as a service that you've built, see Register
and use custom connectors.

All standard connectors


See the Microsoft Connector Reference for a list of all the standard connectors. Premium connectors require
PowerApps Plan 1 or Plan 2. For more information, see PowerApps Plans.
You can ask questions about a specific connector in the PowerApps forums, and you can suggest connectors to
add or other improvements to make in PowerApps Ideas.
Connect to Common Data Service
6/28/2019 • 2 minutes to read • Edit Online

You can securely store your business data in Common Data Service and build rich apps in PowerApps so that users
can manage that data. You can also integrate that data into solutions that include Microsoft Flow, Power BI, and
data from Dynamics 365.
By default, the Common Data Service connector connects to data in your app's current environment. If your app
moves to another environment, the connector connects to data in the new environment. This behavior works well
for an app using a single environment or an app that follows an ALM process for moving from Development to
Test to Production.
When you add a data source with the Common Data Service connector, you can change the environment and then
select one or more entities. By default, the app connects to data in the current environment, and the UI shows
(Current) over the list of entities.

If you select Change, you can specify a different environment to pull data from it instead of or in addition to the
current environment.

The name of the selected environment appears under the search box.
The Common Data Service connector is more robust than the Dynamics 365 connector and approaching feature
parity.
More information: What is Common Data Service?
Connect to SharePoint from a canvas app
4/4/2019 • 6 minutes to read • Edit Online

Connect to a SharePoint site to generate an app automatically from a custom list, or create a connection before
you add data to an existing app or build an app from scratch.
Depending on where your data resides, you can take either or both of these approaches:
Show data from a custom list in a SharePoint Online site or an on-premises site.
Show images and play video or audio files in a library (SharePoint Online only).

Generate an app
If you want to manage data in a custom list, PowerApps can generate a three-screen app for you automatically.
Users can browse the list on the first screen, show details of an item in the second screen, and create or update
items in the third screen.

NOTE
If your SharePoint list contains a Choice, Lookup, or Person or group column, see Show data in a gallery later in this topic.

Create a connection
1. Sign in to PowerApps, select Data > Connections in the left navigation bar, and then select New
connection near the upper-left corner.
2. In the search box near the upper-right corner, type or paste SharePoint, and then select SharePoint.

3. Perform either of these sets of steps:


To connect to SharePoint Online, select Connect directly (cloud services), select Create, and then
provide credentials (if prompted).

The connection is created, and you can add a data to an existing app or build an app from scratch.
To connect to an on-premises site, select Connect using on-premises data gateway.
Specify Windows as the authentication type, and then specify your credentials. (If your credentials
include a domain name, specify it as domain\alias.)

Under Choose a gateway, select the gateway that you want to use, and then select Create.

NOTE
If you don't have an on-premises data gateway installed, install one, and then select the icon to refresh the
list of gateways.

The connection is created, and you can add a data to an existing app or build an app from scratch.

Add data to an existing app


1. In PowerApps Studio, open the app that you want to update, select the View tab, and then select Data
sources.

2. In the Data pane, select Add data source > SharePoint.


3. Under Connect to a SharePoint site, select an entry in the Recent sites list (or type or paste the URL for
the site that you want to use), and then select Connect.
4. Under Choose a list, select the check box for Documents or one or more lists that you want to use, and
then select Connect:

Not all types of lists appear by default. PowerApps supports custom lists, not template-based lists. If the
name of the list that you want to use doesn't appear, scroll to the bottom, and then type the name of the list
in the box that contains Enter custom table name.

The data source or sources are added to your app.

Build your own app from scratch


Apply the concepts in Create an app from scratch to SharePoint instead of Excel.

Show list columns in a gallery


If your custom list contains any of these types of columns, show that data in a Gallery control by using the
formula bar to set the Text property of one or more Label controls in that gallery:
For a Choice or Lookup column, specify ThisItem.ColumnName.Value to show data in that column.
For example, specify ThisItem.Location.Value if you have a Choice column named Location, and specify
ThisItem.PostalCode.Value if you have a Lookup column named PostalCode.
For a Person or Group column, specify ThisItem.ColumnName.DisplayName to show the display name
of the user or the group.
For example, specify ThisItem.Manager.DisplayName to show display names from a Person or Group
column named Manager.
You can also show different information about users, such as email addresses or job titles. To display a
complete list of options, specify ThisItem.ColumnName. (including the trailing period).
NOTE
For a CreatedBy column, specify ThisItem.Author.DisplayName to show the display names of users who created
items in the list. For a ModifiedBy column, specify ThisItem.Editor.DisplayName to show the display names of
users who changed items in the list.

For a Managed Metadata column, specify ThisItem.ColumnName.Label to show data in that column.
For example, specify ThisItem.Languages.Label if you have a Managed Metadata column named
Languages.

Show data from a library


If you have several images in a SharePoint library, you can add a Drop down control to your app so that users
can specify which image to show. You can also apply the same principles to other controls, such as Gallery
controls, and other types of data, such as videos.
1. If you haven't already, create a connection, and then add data to an existing app.
2. Add a Drop down control, and name it ImageList.
3. Set the Items property of ImageList to Documents.
4. On the Properties tab of the right-hand pane, open the Value list, and then select Name.
The file names of the images in your library appear in ImageList.

5. Add an Image control, and set its Image property to this expression:
ImageList.Selected.'Link to item'

6. Press F5, and then select a different value in ImageList.


The image that you specified appears.
You can download a sample app that demonstrates a more complex approach to showing data from a SharePoint
library.
1. After you download the app, open PowerApps Studio, select Open in the left navigation bar, and then select
Browse.
2. In the Open dialog box, find and open the file that you downloaded, and then add a SharePoint library as a
data source by following the first two procedures in this topic.

NOTE
By default, this app shows delegation warnings, but you can ignore them if your library contains fewer than 500 items.

In this one-screen app, the list in the lower-left corner shows all files in your library.
You can search for a file by typing or pasting one or more characters in the search box near the top.
If your library contains folders, you can filter the list of files by selecting a filter icon in the list of folders just
under the title bar.
When you find the file that you want, select it to show it in the Video, Image, or Audio control along the right-
hand side.

Known issues
Lists
PowerApps can read column names that contain spaces, but the spaces are replaced with the hexadecimal escape
code "_x0020_". For example, "Column Name" in SharePoint will appear as "Column_x0020_Name" in
PowerApps when displayed in the data layout or used in a formula.
Not all types of columns are supported, and not all types of columns support all types of cards.

COLUMN TYPE SUPPORT DEFAULT CARDS

Single line of text Yes View text

Multiple lines of text Yes View text

Choice Yes View lookup


Edit lookup
View multiselect
Edit multiselect

Number Yes View percentage


View rating
View text

Currency Yes View percentage


View rating
View text

Date and Time Yes View text

Lookup Yes View lookup


Edit lookup
View multiselect
Edit multiselect

Boolean (Yes/No) Yes View text


View toggle

Person or Group Yes View lookup


Edit lookup
View multiselect
Edit multiselect

Hyperlink Yes View URL


View text

Picture Yes (read-only) View image


View text

Attachment Yes (read-only) View Attachments

Calculated Yes (read-only)

Task Outcome No

External data No

Managed Metadata Yes (read-only)

Rating No
Libraries
You can't upload files from PowerApps to a library.
You can't show PDF files from a library in a PDF Viewer control.
PowerApps Mobile doesn't support the Download function.
If your users will run the app in PowerApps Mobile or the Windows 10 app, use the Launch function to display
library content in a gallery.

Next steps
Learn how to show data from a data source.
Learn how to view details and create or update records.
See other types of data sources to which you can connect.
Connect to SQL Server from PowerApps
8/24/2018 • 6 minutes to read • Edit Online

Connect to SQL Server, in either Azure or an on-premises database, so that you can display information from it in
PowerApps.

Prerequisites
Sign up for PowerApps, and then sign in by providing the same credentials that you used to sign up.
Gather the following information for a database that contains at least one table with a primary key:
the name of the database
the name of the server on which the database is hosted
a valid user name and password to connect to the database
the type of authentication needed to connect to the database
If you don't have this information, ask the administrator of the database that you want to use.
For an on-premises database, identify a data gateway that was shared with you (or create one).

NOTE
Gateways and on-premises connections can only be created and used in the user's default environment.

Generate an app automatically


1. In PowerApps Studio, click or tap New on the File menu (along the left edge).

2. Under Start with your data, click or tap the right arrow at the end of the row of connectors.
3. If you already have a connection to the database that you want to use, click or tap it, and then skip to step 7
in this procedure.
4. Click or tap New connection, and then click or tap SQL Server.
5. Perform either of these steps:
Specify Connect directly (cloud services), and then type or paste the server name, the database
name, the user name, and the password for the database that you want to use.

Specify Connect using on-premises data gateway, type or paste the server name, the database
name, the user name, and the password for the database that you want to use, and specify the
authentication type and the gateway.
NOTE
If you don't have a gateway, install one, and then click or tap Refresh gateway list.

6. Click or tap Connect.


7. Click or tap an option under Choose a dataset, click or tap an option under Choose a table, and then click
or tap Connect.
PowerApps creates an app that shows data on three screens. Heuristics suggest what kind of data to show,
but you might need to customize the UI to suit your needs.
8. Customize the app by using techniques that are similar to those that Create an app from Excel describes,
starting with changing the app layout.

Build an app from scratch


1. Sign in to powerapps.com with the same account that you used to sign up for PowerApps.
2. In the left navigation bar, click or tap Connections:
3. In the upper-right corner, click or tap New connection, and then click or tap SQL Server.
4. Perform either of these steps:
Specify Connect directly (cloud services), and then type or paste the server name, the database
name, the user name, and the password for the database that you want to use.

Specify Connect using on-premises data gateway, type or paste the server name, the database
name, the user name, and the password for the database that you want to use, and specify the
authentication type and the gateway.

NOTE
If you don't have a gateway, install one, and then click or tap the clockwise icon to refresh the list.

5. Click or tap Create to create the connection.


6. Create an app by using techniques that are similar to those that Create an app from scratch describes.

Update an existing app


1. In PowerApps Studio, open the app that you want to update.
2. Click or tap Data sources on the View tab of the ribbon.
3. In the right-hand pane, click or tap Add a data source.

4. Click or tap New connection, click or tap SQL Server, and then click or tap Connect.
5. Perform either of these steps:
Specify Connect directly (cloud services), and then type or paste the server name, the database
name, the user name, and the password for the database that you want to use.

Specify Connect using on-premises data gateway, type or paste the server name, the database
name, the user name, and the password for the database that you want to use, and specify the
authentication type and the gateway.
NOTE
If you don't have a gateway, install one, and then click or tap the circular icon to refresh the list.

6. Click or tap Connect.


7. Under Choose a dataset, click or tap an option.
8. Under Choose a table, select one or more checkboxes, and then click or tap Connect.

Next steps
Learn how to show data from a data source.
Learn how to view details and create or update records.
See other types of data sources to which you can connect.
Understand tables and records with tabular data sources.
Connect to Dynamics 365 from PowerApps
8/24/2018 • 3 minutes to read • Edit Online

PowerApps lets you quickly generate, customize, share, and run mobile apps with little or no code. By using the
Dynamics 365 connector, you can create useful mobile apps to share with your organization in just a few minutes.
By following the steps in this topic, you'll create an app in which users can browse, add, delete, and make updates
to contacts in Dynamics 365. Users can run the app in a browser or on a mobile device such as a phone.

Prerequisite
To follow this tutorial, you need a Microsoft Office 365 account that includes a Dynamics 365 subscription.

Create a connection
1. Sign in to PowerApps.
2. In the left navigation pane, click Connections.

3. Near the upper-right corner, click New connection.

4. In the list of connections, click Dynamics 365.

5. In the dialog box, click Create.

6. In the Sign in to your account dialog box, provide your credentials for the Dynamics 365 (online) tenant.
A connection is created.
Generate an app automatically
1. Sign in to PowerApps, and then click New app near the lower-left corner.

2. Under Start with your data, click Phone layout on the Dynamics 365 tile.

3. Under Connections, select the connection that you want, and then choose a dataset, which corresponds to
the instance of Dynamics 365 that you'll manage in the app.
4. Under Choose a table, click Contacts, and then click Connect.
5. In the left navigation bar, click or tap an icon in the upper-right corner to switch to the thumbnail view.

PowerApps generates a three-screen app based on contact records.


BrowseScreen1. This screen appears by default when users open the app. In the left navigation bar, a
thumbnail for this screen appears above the other two screens.
DetailScreen1. This screen appears when users click an item in BrowseScreen1. In the left navigation bar, a
thumbnail for DetailScreen1 appears between the other two screens.
EditScreen1. This screen appears when users click the edit icon for an item in DetailScreen1. In the left
navigation bar, a thumbnail for EditScreen1 appears under the other two screens.
The app can run in its initial state, but we can make it more useful by refining the information on each screen.

Customize BrowseScreen1
In this procedure, you'll configure BrowseScreen1 to show the first and last names of each contact. The data will
be sorted alphabetically by last name and include images in a two-column grid.
1. In BrowseScreen1, select the gallery by clicking any record in it except the first one.
2. In the right-hand pane, click or tap the Data tab.
3. In the list of layouts, click or tap the one that shows pictures and text in a two-column grid.
You might need to scroll down to show this option.

4. Copy this formula and then, with the gallery still selected, paste the formula in the formula bar (to the right
of the fx button):
SortByColumns(Search(Filter(Contacts,statuscode=1), TextSearchBox1.Text, "lastname"), "lastname",
If(SortDescending1, Descending, Ascending))

5. In the right-hand pane, set the top drop-down list to firstname and the middle drop-down list to lastname.

6. (optional) On the File menu, click Save as, type a name for the app, and then click Save.
By default, the app will be saved to the cloud. Click This computer to save your app locally.
Customize DetailsScreen1 and EditScreen1
1. In the left navigation bar, click the middle thumbnail to select DetailsScreen1.
2. On DetailScreen1, click anywhere below the title bar to show customization options in the right-hand
pane.

3. In the right-hand pane, click the eye icon for each field to hide it.

4. Click anywhere under the title bar to select Form1.

5. In the right-hand pane, click the eye icon for each of these fields, so that the screen will show an image (if
the table contains one) and four other fields for each contact:
entityimage
firstname
lastname
mobilephone
emailaddress1
The right-hand pane should resemble this graphic:

6. Select EditScreen1 by clicking the bottom thumbnail in the left navigation bar.
7. Repeat the steps in this procedure to customize EditScreen1 the same way as DetailsScreen1.
8. (optional) Save the app.

Next steps
Test your app in Preview mode by clicking BrowseScreen1 in the left navigation bar and then pressing F5 or
clicking near the upper-right corner.
Share your app.
Add a second data source.
Connect to Office 365 Users connection from
PowerApps
8/24/2018 • 5 minutes to read • Edit Online

Office 365 Users lets you access user profiles in your organization using your Office 365 account. You can
perform various actions such as get your profile, a user's profile, a user's manager or direct reports.
You can display this information in a label on your app. You can display one function, multiple functions, or even
combine different functions. For example, you can create an expression that combines the User Name and Phone
Number, and then display this information in your app.
This topic shows you how to add Office 365 Users as a connection, add Office 365 Users as a data source to your
app, and use table data in a gallery control.

Prerequisites
Access to PowerApps
Add the connection
Create an app from a template, from data, or from scratch

Add a connection
1. Add a data connection and select Office 365 Users:

2. Select Connect, and if prompted to sign in, enter your work account.
The Office 365 Users connection has been created and added to your app. Now, it's ready to be used.

Use the connection in your app


Show information about the current user
1. On the Insert menu, select Label
2. In the function bar, set its Text property to any of the following formulas:
Office365Users.MyProfile().Department
Office365Users.MyProfile().DisplayName
Office365Users.MyProfile().GivenName
Office365Users.MyProfile().Id
Office365Users.MyProfile().JobTitle
Office365Users.MyProfile().Mail
Office365Users.MyProfile().MailNickname
Office365Users.MyProfile().Surname
Office365Users.MyProfile().TelephoneNumber
Office365Users.MyProfile().UserPrincipalName
Office365Users.MyProfile().AccountEnabled

The label shows the information that you entered about the current user.
Show information about another user
1. On the Insert menu, select Text, and then select Text input. Rename it InfoAbout:

2. In InfoAbout, type or paste an email address of a user in your organization. For example, type in
[email protected].
3. Add a Label (Insert menu), and set its Text property to any of the following formulas:
To show information about another user:
Office365Users.UserProfile(InfoAbout.Text).Department
Office365Users.UserProfile(InfoAbout.Text).DisplayName
Office365Users.UserProfile(InfoAbout.Text).GivenName
Office365Users.UserProfile(InfoAbout.Text).Id
Office365Users.UserProfile(InfoAbout.Text).JobTitle
Office365Users.UserProfile(InfoAbout.Text).Mail
Office365Users.UserProfile(InfoAbout.Text).MailNickname
Office365Users.UserProfile(InfoAbout.Text).Surname
Office365Users.UserProfile(InfoAbout.Text).TelephoneNumber
Office365Users.UserProfile(InfoAbout.Text).UserPrincipalName
Office365Users.UserProfile(InfoAbout.Text).AccountEnabled

To show information about another user's manager:


Office365Users.Manager(InfoAbout.Text).Department
Office365Users.Manager(InfoAbout.Text).DisplayName
Office365Users.Manager(InfoAbout.Text).GivenName
Office365Users.Manager(InfoAbout.Text).Id
Office365Users.Manager(InfoAbout.Text).JobTitle
Office365Users.Manager(InfoAbout.Text).Mail
Office365Users.Manager(InfoAbout.Text).MailNickname
Office365Users.Manager(InfoAbout.Text).Surname
Office365Users.Manager(InfoAbout.Text).TelephoneNumber
Office365Users.Manager(InfoAbout.Text).UserPrincipalName
Office365Users.Manager(InfoAbout.Text).AccountEnabled

The label shows the information that you entered about the user you specified or that user's manager.

NOTE
If you're developing an app based on an entity in the Common Data Service, you can specify a user based on ID instead of
email address.

For example, you can create an app automatically, add a screen that contains a Label control, and set the control's
Text property to this formula:
Office365Users.UserProfile(BrowseGallery1.Selected.CreatedByUser).DisplayName
If you create a contact and select that contact in the browse screen of the app, the Label control will show your
display name.
Show the direct reports of another user
1. Add a Text input control (Insert menu > Text), and rename it InfoAbout.
2. In InfoAbout, enter the email address of a user in your organization. For example, enter
[email protected]
3. Add a With text gallery ( Insert menu > Gallery), and set its Items property to the following formula:
Office365Users.DirectReports(InfoAbout.Text)

The gallery shows information about the direct reports of the user you entered.
With the gallery selected, the right-hand pane shows options for that gallery.
4. In the second list, select JobTitle. In the third list, select DisplayName. The gallery is updated to show
these values.

NOTE
The first box is actually an image control. If you don't have an image, you can delete the image control, and add a label in its
place. Add and configure controls is a good resource.

Search for users


1. Add a Text input control (Insert menu > Text), and rename it SearchTerm. Enter a name to search. For
example, enter your first name.
2. Add a With text gallery ( Insert menu > Gallery), and set its Items property to the following formula:
Office365Users.SearchUser({searchTerm: SearchTerm.Text})

The gallery shows users whose name contains the search text you entered.
With the gallery selected, the right-hand pane shows options for that gallery.
3. In the second list, select Mail. In the third list, select DisplayName.
The second and third labels in the gallery are updated.
View the available functions
This connection includes the following functions:

FUNCTION NAME DESCRIPTION

MyProfile Retrieves the profile for the current user

UserProfile Retrieves a specific user profile

Manager Retrieves user profile for the manager of the specified user

DirectReports Returns the direct reports for the specified user

SearchUser Retrieves search results of user profiles

MyProfile
Get my profile: Retrieves the profile for the current user.
Input properties
None.
Output properties

PROPERTY NAME TYPE DESCRIPTION

Department string Department of the user.

DisplayName string Display name of user.

GivenName string Given name of user.

Id string User id

JobTitle string Job Title of the user.

Mail string Email id of user.

MailNickname string Nickname of user.

Surname string Surname of user.

TelephoneNumber string Telephone number of user.

UserPrincipalName string User Principal Name.

AccountEnabled boolean Account enabled flag.

UserProfile
Get user profile: Retrieves a specific user profile.
Input properties
NAME DATA TYPE REQUIRED DESCRIPTION

Id string yes User principal name or email


id

Output properties

PROPERTY NAME TYPE DESCRIPTION

Department string Department of the user.

DisplayName string Display name of user.

GivenName string Given name of user.

Id string User id

JobTitle string Job Title of the user.

Mail string Email id of user.

MailNickname string Nickname of user.

Surname string Surname of user.

TelephoneNumber string Telephone number of user.

UserPrincipalName string User Principal Name.

AccountEnabled boolean Account enabled flag.

Manager
Get manager: Retrieves user profile for the manager of the specified user
Input properties

NAME DATA TYPE REQUIRED DESCRIPTION

Id string yes User principal name or email


id

Output properties

PROPERTY NAME TYPE DESCRIPTION

Department string Department of the user.

DisplayName string Display name of user.

GivenName string Given name of user.

Id string User id

JobTitle string Job Title of the user.


PROPERTY NAME TYPE DESCRIPTION

Mail string Email id of user.

MailNickname string Nickname of user.

Surname string Surname of user.

TelephoneNumber string Telephone number of user.

UserPrincipalName string User Principal Name.

AccountEnabled boolean Account enabled flag.

DirectReports
Get direct reports: Get direct reports
Input properties

NAME DATA TYPE REQUIRED DESCRIPTION

Id string yes User principal name or email


id

Output properties

PROPERTY NAME TYPE DESCRIPTION

Department string Department of the user.

DisplayName string Display name of user.

GivenName string Given name of user.

Id string User id

JobTitle string Job Title of the user.

Mail string Email id of user.

MailNickname string Nickname of user.

Surname string Surname of user.

TelephoneNumber string Telephone number of user.

UserPrincipalName string User Principal Name.

AccountEnabled boolean Account enabled flag.

SearchUser
Search for users: Retrieves search results of user profiles
Input properties
NAME DATA TYPE REQUIRED DESCRIPTION

searchTerm string no Search string. Applies to:


display name, given name,
surname, mail, mail
nickname, and user principal
name

Output properties

PROPERTY NAME TYPE DESCRIPTION

Department string Department of the user.

DisplayName string Display name of user.

GivenName string Given name of user.

Id string User id

JobTitle string Job Title of the user.

Mail string Email id of user.

MailNickname string Nickname of user.

Surname string Surname of user.

TelephoneNumber string Telephone number of user.

UserPrincipalName string User Principal Name.

AccountEnabled boolean Account enabled flag.

Helpful links
See all the available connections.
Learn how to add connections to your apps.
Connect to Office 365 Outlook from PowerApps
8/24/2018 • 3 minutes to read • Edit Online

If you connect to Office 365 Outlook, you can show, send, delete, and reply to email messages, in addition to
other tasks.
You can add controls to perform these functions in your app. For example, you can add Text input controls to ask
for the recipient, the subject, and the body of the email, and add a Button control to send the email.
This topic shows you how to add Office 365 Outlook as a connection, add Office 365 Outlook as a data source to
your app, and use this data in different controls.

IMPORTANT
As of this writing, the calendar operation doesn't support recurring events.

Prerequisites
Access to PowerApps
Add the connection
Create an app from a template, from data, or from scratch

Connect to Office 365 Outlook


1. Add a data connection and select Office 365 Outlook:

2. Select Connect, and if prompted to sign in, enter your work account.
The Office 365 Outlook connection has been created and added to your app. Now, it's ready to be used.
Show messages
1. On the Insert menu, select Gallery, and then select a Text gallery control.
2. Set its Items property to the following formula:
Office365.GetEmails({fetchOnlyUnread:false})

The gallery control is automatically populated with some of your emails.


3. In the gallery, set the Text property of the first label to ThisItem.From . Set the second label to
ThisItem.Subject . Set the third label to ThisItem.Body . You can also resize the labels.

The gallery control is automatically populated with the new properties.


4. This function has several optional parameters available. Set the gallery's Items property to one of the
following formulas:
Office365.GetEmails({fetchOnlyUnread:false})
Office365.GetEmails({fetchOnlyUnread:false, top:2})
Office365.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2})
Office365.GetEmails({folderPath:"Sent Items", fetchOnlyUnread:false, top:2, searchQuery:"powerapps"})
Office365.GetEmails({folderPath:"Deleted Items", fetchOnlyUnread:false, top:2, skip:3})

Send a message
1. On the Insert menu, select Text, and then select Text input.
2. Repeat the previous step two more times so that you have three boxes, and then arrange them in a column:

3. Rename the controls to:


inputTo
inputSubject
inputBody
4. On the Insert menu, select Controls, and then select Button. Set its OnSelect property to the following
formula:
Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text)

5. Move the button so that it appears under all the other controls, and set its Text property to "Send email".

6. Press F5, or select the Preview button ( ). Type in a valid email address in inputTo, and type whatever
you want in the other two Text input controls.
7. Select Send email to send the message. Press Esc to return to the default workspace.

Send a message with an attachment


You can, for example, create an app in which the user takes pictures by using the device's camera and then sends
them as attachments. Users can also attach many other kinds of files to an email app.
To add an attachment to a message, follow the steps in the previous section, but add a parameter to specify an
attachment (when you set the OnSelect property of the button). This parameter is structured as a table in which
you specify up to three properties for each attachment:
Name
ContentBytes
@odata.type

NOTE
You can specify the @odata.type property for only one attachment, and you can set it to an empty string.

In this example, a photo will be sent as file1.jpg:


Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg",
ContentBytes:Camera1.Photo, '@odata.type':""})})

In this example, an audio file will be sent in addition to the photo:


Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text, {Attachments:Table({Name:"file1.jpg",
ContentBytes:Camera1.Photo, '@odata.type':""}, {Name:"AudioFile", ContentBytes:microphone1.audio })})

Delete a message
1. On the Insert menu, select Gallery, and then select a Text gallery control.
2. Set its Items property to the following formula:
Office365.GetEmails({fetchOnlyUnread:false})

The gallery control is automatically populated with some of your emails.


3. In the gallery, set the Text property of the first label to ThisItem.Id . Set the second label to
ThisItem.Subject . Set the third label to ThisItem.Body .

4. Select the first label in the gallery, and rename it to EmailID:

5. Select the third label in the gallery, and add a Button (Insert menu). Set the button's OnSelect property
to the following formula:
Office365.DeleteEmail(EmailID.Text)

6. Press F5, or select the Preview button ( ). Select one of the emails in your gallery, and click the button.

NOTE
This deletes the selected email from your inbox. So, choose wisely.
7. Press Esc to return to the default workspace.

Mark a message as read


This section uses the same controls as Delete a message.
1. Set the button's OnSelect property to the following formula:
Office365.MarkAsRead(EmailID.Text)

2. Press F5, or select the Preview button ( ). Select one of the unread emails, and then click the button.
3. Press Esc to return to the default workspace.

Helpful links
For a list of all functions and their parameters, see the Office 365 Outlook reference.
See all the available connections.
Learn how to manage your connections.
Connect to Excel from PowerApps
8/24/2018 • 2 minutes to read • Edit Online

Excel is kind of a connection. To display Excel data in your app:


1. Format the Excel data as a table.
2. Store the Excel file in a cloud-storage account, such as Box, Dropbox, Google Drive, OneDrive, and OneDrive
for Business.
3. Connect to the cloud-storage account, and then add the Excel table as a data source.
4. Display this information in your app by generating an app automatically or by adding and configuring, for
example, a Gallery control.

NOTE
When you connect to your Excel table from PowerApps, it will create a column called _PowerAppsId_, with a unique ID for
each row of your Excel table.

Overview of the cloud-storage connection shows you how to add the connection, add an Excel table as a data
source, and use the Excel data in your app.
For information about how to connect to other types of data, see the list of connections for PowerApps.
Known limitations
For information about how to share Excel data within your organization, review these limitations.
Connect to cloud-storage from PowerApps
8/24/2018 • 2 minutes to read • Edit Online

PowerApps offers several cloud-storage connections. Using any of these connections, you can store an Excel file
and use the information in it throughout your app. These connections include:

ONEDRIVE
AZURE BLOB BOX DROPBOX GOOGLE DRIVE ONEDRIVE FOR BUSINESS

Prerequisites
Access to PowerApps
Add the connection
Create an app from a template, from data, or from scratch
An Excel file with the data formatted as a table:
1. Open the Excel file, and then select any cell in the data that you want to use.
2. On the Insert tab, select Table.
3. In the Save as Table dialog box, select the My table has headers checkbox, and then select OK.
4. Save your changes.

Connect to the cloud storage connection


1. At powerapps.com, expand Manage, and select Connections:

2. Select New connection, and select your cloud storage connection. For example, select OneDrive.
3. You are prompted for the user name and password of your cloud storage account. Enter them, and then
select Sign in:
Once you are signed in, this connection is ready to be used within your apps.
4. In your app, click or tap Data sources on the View tab of the ribbon. In the right-hand pane, click or tap
Add a data source, click or tap your cloud-storage connection, and then choose the Excel table.
5. Select Connect.
The table is listed as a data source:
NOTE
Remember, the Excel data must be formatted as a table.

Using the Excel data in your app


1. On the Insert tab, select Gallery, and then select a With text gallery control.
2. Set the Items property of the gallery to your Excel table. For example, if your Excel table is named
Table1, then set it to Table1:

The gallery is automatically updated with information from your Excel table.
3. In the gallery, select the second or third Label control. By default, you see the Text property of the second
and third labels is automatically set to ThisItem.something . You can set these labels to any column in your
table.
In the following example, the second label is set to ThisItem.Name and the third label is set to
ThisItem.Notes :
Sample output:

NOTE
The first box is actually an image control. If you don't have an image in your Excel table, then you can delete the image
control, and add a label in its place. Add and configure controls is a good resource.

Understand tables and records provides more details and some examples.

Sharing your app


You can share your app, your resources such as connectors, and your data with others in your organization.
If you're sharing a folder in Dropbox, the shared folder must be attached to the user's Dropbox account.
There are certain limitations with connectors involving Excel files.

Known limitations
If Data type unsupported or Not formatted as a table appears when you try to use an Excel connection in
your app, format the data as a table.
If your Excel data includes a calculated column, you can't use it to build an app, and you can’t add that data to an
existing app.
Sharing Excel tables
To share data in an Excel file:
In OneDrive for Business, share the file itself.
In OneDrive, share the folder that contains the file, and specify file paths, not URLs, for any media.
In Dropbox or Google Drive, share either the file or the folder.

Helpful links
See all the available connections.
Learn how to add connections and add a data source to your apps.
Understand tables and records with tabular data sources.
Some additional gallery resources include Show a list of items and Show images and text in a gallery.
Add a data connection to a canvas app in
PowerApps
5/20/2019 • 2 minutes to read • Edit Online

In PowerApps, add a data connection to an existing canvas app or to an app that you're building from scratch.
Your app can connect to SharePoint, Common Data Service, Salesforce, OneDrive, or many other data sources.
Your next step after this article is to display and manage data from that data source in your app, as in these
examples:
Connect to OneDrive, and manage data in an Excel workbook in your app.
Connect to Twilio, and send an SMS message from your app.
Connect to Common Data Service, and update an entity from your app.
Connect to SQL Server, and update a table from your app.

Prerequisites
Sign up for PowerApps, and then sign in by providing the same credentials that you used to sign up.

Open a blank app


1. On the Home tab, select Canvas app from blank.
2. Specify a name for your app, and then select Create.
3. If the Welcome to PowerApps Studio dialog box appears, select Skip.

Add data source


1. In the center pane, select connect to data to open the Data pane.
If this were an existing app and the screen already contained a control, select View > Data sources to
open the same pane.
2. Select Add data source.
3. If the list of connections includes the one that you want, select it to add it to the app. Otherwise, skip to
the next step.
4. Select New connection to display a list of connections.

5. In the search bar, type or paste the first few letters of the connection you want, and then select the
connection when it appears.

6. Select Create to both create the connection and add it to your app.
Some connectors, such as Office 365 Outlook, require no additional steps, and you can show data from
them immediately. Other connectors prompt you to provide credentials, specify a particular set of data, or
perform other steps. For example, SharePoint and SQL Server require additional information before you
can use them. With Common Data Service, you can change the environment before you select an entity.

Identify or change a data source


If you're updating an app, you might need to identify or change the source of data that appears in a gallery, a
form, or another control. For example, you might need to identify a data source as you update an app that
someone else created or that you created long ago.
1. Select the control, such as a gallery, for which you want to identify or change the data source.
The name of the data source appears on the Properties tab of the right-hand pane.

2. To show more information about the data source or to change it, select the down arrow next to its name.
More information about the current data source appears, and you can select or create another source.

Next steps
To show and update data in a source such as Excel, SharePoint, Common Data Service, or SQL Server, add a
gallery, and add a form.
For data in other sources, use connector-specific functions such as those for Office 365 Outlook, Twitter, and
Microsoft Translator.
Manage canvas-app connections in PowerApps
8/24/2018 • 2 minutes to read • Edit Online

In powerapps.com, create a connection to one or more data sources, delete a connection, or update its
credentials.
Your canvas app's data connection can connect to SharePoint, SQL Server, Office 365, OneDrive for Business,
Salesforce, Excel, and many other data sources.
Your next step after this article is to display and manage data from the data source in your app, as in these
examples:
Connect to OneDrive for Business, and manage data in an Excel workbook in your app.
Update a list on a SharePoint site.
Connect to SQL Server, and update a table from your app.
Send email in Office 365.
Send a tweet.
Connect to Twilio, and send an SMS message from your app.

Prerequisites
1. Sign up for PowerApps.
2. Sign in to powerapps.com using the same credentials that you used to sign up.

Background on data connections


Most PowerApps apps use external information called Data Sources that is stored in cloud services. A common
example is a table in an Excel file stored in OneDrive for Business. Apps are able to access these data sources by
using Connections.
The commonest type of data source is the table, which you can use to retrieve and store information. You can use
connections to data sources to read and write data in Microsoft Excel workbooks, SharePoint lists, SQL tables,
and many other formats, which can be stored in cloud services like OneDrive for Business, DropBox, SQL
Server, etc.
There are other kinds of data sources that are not tables, such as email, calendars, twitter, and (coming soon)
notifications.
Using the Gallery, Display form, and Edit form controls, it is easy to create an app that reads and writes data
from a data source. To get started, read the article Understand data forms.
In addition to creating and managing connections in powerapps.com, you also create connections when you do
these tasks:
Automatically generate an app from data, such as a custom SharePoint list.
Update an existing app, or create one from scratch as add a connection describes.
Open an app that another user created and shared with you.
NOTE
If you want to use PowerApps Studio instead, open the File menu, and then click or tap Connections, powerapps.com
opens so that you can create and manage connections there.

Create a new connection


1. If you have not already done so, log in to powerapps.com.
2. In the left navigation bar, click or tap Connections.

3. In the upper-right corner, click or tap New connection.

4. Click or tap a connector in the list that appears, and then follow the prompts.

5. Click or tap the Create button.


6. Follow the prompts. Some connectors prompt you to provide credentials, specify a particular set of data,
or perform other steps. Others such as Microsoft Translator, do not.
For example, these connectors require additional information before you can use them.
SharePoint
SQL Server
The new connector appears under Connections, and you can add it to an app.

Update or delete a connection


In the list of connections, find the connection that you want to update or delete, and then click or tap the ellipsis
(3-dots-symbol) on the right of the connection.

To update the credentials for a connection, click or tap the key icon, and then provide credentials for that
connection.
To delete the connection, click or tap the trash-can icon.
Format a table in Excel and naming tips
8/24/2018 • 2 minutes to read • Edit Online

In PowerApps, you can create a canvas app based on Excel data only if it's formatted as a table. By following this
content, you'll learn how to format a table in Excel and some tips of naming Excel columns.

How to format a table in Excel


You can convert your data to a table by selecting Format as Table in the Home tab of Excel.

You can also create a table by selecting Table on the Insert tab.

To find your table easily, go to Design under Table Tools, and rename your table. It's useful to give your table a
meaningful name, especially when the same Excel file contains more than one table.

Naming tips in Excel


If a column in your table contains images, include "image" in the name of that column. This keyword will bind that
column to an image control in a gallery.
Next steps
Generate an app from Excel in PowerApps based on a table that you specify. The app will have three screens by
default: one each for browsing records, displaying details about a single record, and creating or updating a
record.
Create an app from scratch using the table you format in Excel. You can manually create and customize your
app to display, browse, or edit the data in your table.
Understand delegation in a canvas app
4/5/2019 • 9 minutes to read • Edit Online

PowerApps includes a powerful set of functions for filtering, sorting, and shaping tables of data in a canvas
app: Filter, Sort, and AddColumns functions to name just a few. With these functions, you can provide your
users with focused access to the information they need. For those with a database background, using these
functions is the equivalent of writing a database query.
The key to building efficient apps is to minimize the amount of data that must be brought to your device.
Perhaps you need only a handful of records from a sea of million, or a single aggregate value can represent
thousands of records. Or perhaps only the first set of records can be retrieved, and the rest brought in as the
user gestures that they want more. Being focused can dramatically reduce the processing power, memory, and
network bandwidth that your app needs, resulting in snappier response times for your users, even on phones
connected via a cellular network.
Delegation is where the expressiveness of PowerApps formulas meets the need to minimize data moving over
the network. In short, PowerApps will delegate the processing of data to the data source, rather than moving
the data to the app for processing locally.
Where this becomes complicated, and the reason this article exists, is because not everything that can be
expressed in a PowerApps formula can be delegated to every data source. The PowerApps language mimics
Excel's formula language, designed with complete and instant access to a full workbook in memory, with a
wide variety of numerical and text manipulation functions. As a result, the PowerApps language is far richer
than most data sources can support, including powerful database engines such as SQL Server.
Working with large data sets requires using data sources and formulas that can be delegated. It's the
only way to keep your app performing well and ensure users can access all the information they need. Take
heed of delegation warnings that identify places where delegation isn't possible. If you're working with small
data sets (fewer than 500 records), you can use any data source and formula because the app can process data
locally if the formula can't be delegated.

NOTE
Delegation warnings were previously flagged in PowerApps as "blue dot" suggestions, but delegation suggestions have
since been re-classified as warnings. If the data in your data source exceeds 500 records and a function can't be
delegated, PowerApps might not be able to retrieve all of the data, and your app may have wrong results. Delegation
warnings help you manage your app so that it has correct results.

Delegable data sources


Delegation is supported for certain tabular data sources only. If a data source supports delegation, its
connector documentation outlines that support. For example, these tabular data sources are the most popular,
and they support delegation:
Common Data Service
SharePoint
SQL Server
Imported Excel workbooks (using the Add static data to your app data source), collections, and tables stored
in context variables don't require delegation. All of this data is already in memory, and the full PowerApps
language can be applied.
Delegable functions
The next step is to use only those formulas that can be delegated. Included here are the formula elements that
could be delegated. However, every data source is different, and not all of them support all of these elements.
Check for delegation warnings in your particular formula.
These lists will change over time. We're working to support more functions and operators with delegation.
Filter functions
Filter, Search, and LookUp can be delegated.
Within the Filter and LookUp functions, you can use these with columns of the table to select the appropriate
records:
And (including && ), Or (including ||), Not (including !)
In
=, <>, >=, <=, >, <
+, -
TrimEnds
IsBlank
StartsWith, EndsWith
Constant values that are the same across all records, such as control properties and global and context
variables.
You can also use portions of your formula that evaluate to a constant value for all records. For example, Left(
Language(), 2 ), Date( 2019, 3, 31 ), and Today() don't depend on any columns of the record and, therefore,
return the same value for all records. These values can be sent to the data source as a constant and won't block
delegation.
The previous list doesn't include these notable items:
If
*, /, Mod
Concatenate (including & )
ExactIn
String manipulation functions: Lower, Upper, Left, Mid, Len, ...
Signals: Location, Acceleration, Compass, ...
Volatiles: Rand, ...
Collections
Sorting functions
Sort and SortByColumns can be delegated.
In Sort, the formula can only be the name of a single column and can't include other operators or functions.
Aggregate functions
Sum, Average, Min, and Max can be delegated. Only a limited number of data sources support this
delegation at this time; check the delegation list for details.
Counting functions such as CountRows, CountA, and Count can't be delegated.
Other aggregate functions such as StdevP and VarP can't be delegated.
Table shaping functions
AddColumns, DropColumns, RenameColumns, and ShowColumns partially support delegation.
Formulas in their arguments can be delegated. However, the output of these functions are subject to the non-
delegation record limit.
As in this example, makers often use AddColumns and LookUp to merge information from one table into
another, commonly referred to as a Join in database parlance:

AddColumns( Products,
"Supplier Name",
LookUp( Suppliers, Suppliers.ID = Product.SupplierID ).Name
)

Even though Products and Suppliers may be delegable data sources and LookUp is a delegable function, the
output of the AddColumns function isn't delegable. The result of the entire formula is limited to the first
portion of the Products data source. Because the LookUp function and its data source are delegable, a match
for Suppliers can be found anywhere in the data source, even if it's large.
If you use AddColumns in this manner, LookUp must make separate calls to the data source for each of those
first records in Products, which causes a lot of network chatter. If Suppliers is small enough and doesn't
change often, you could call the Collect function in OnStart to cache the data source in your app when it
starts. As an alternative, you could restructure your app so that you pull in the related records only when the
user asks for them.

Non-delegable functions
All other functions don't support delegation, including these notable functions:
First, FirstN, Last, LastN
Choices
Concat
Collect, ClearCollect
CountIf, RemoveIf, UpdateIf
GroupBy, Ungroup

Non-delegable limits
Formulas that can't be delegated will be processed locally. This allows for the full breadth of the PowerApps
formula language to be used. But at a price: all the data must be brought to the device first, which could involve
retrieving a large amount of data over the network. That can take time, giving the impression that your app is
slow or possibly crashed.
To avoid this, PowerApps imposes a limit on the amount of data that can be processed locally: 500 records by
default. We chose this number so that you would still have complete access to small data sets and you would
be able to refine your use of large data sets by seeing partial results.
Obviously care must be taken when using this facility because it can confuse users. For example, consider a
Filter function with a selection formula that can't be delegated, over a data source that contains a million
records. Because the filtering is done locally, only the first 500 records are scanned. If the desired record is
record 501 or 500,001, it isn't considered or returned by Filter.
Aggregate functions can also cause confusion. Take Average over a column of that same million-record data
source. Average can't yet be delegated, so only the first 500 records are averaged. If you're not careful, a
partial answer could be misconstrued as a complete answer by a user of your app.

Changing the limit


500 is the default number of records, but you can change this number for an entire app:
1. On the File tab, select App settings.
2. Under Experimental features, change the Data row limit for non-delegable queries setting from 1 to
2000.
In some cases, you'll know that 2,000 (or 1,000 or 1,500) will satisfy the needs of your scenario. With care, you
can increase this number to fit your scenario. As you increase this number, your app's performance may
degrade, especially for wide tables with lots of columns. Still, the best answer is to delegate as much as you can.
To ensure that your app can scale to large data sets, reduce this setting down to 1. Anything that can't be
delegated returns a single record, which should be easy to detect when testing your app. This can help avoid
surprises when trying to take a proof-of-concept app to production.

Delegation warnings
To make it easier to know what is and isn't being delegated, PowerApps provides warning (yellow triangle)
when you create a formula that contains something that can't be delegated.
Delegation warnings appear only on formulas that operate on delegable data sources. If you don't see a
warning and you believe your formula isn't being properly delegated, check the type of data source against the
list of delegable data sources earlier in this topic.

Examples
For this example, you'll automatically generate a three-screen app based on a SQL Server table named [dbo].
[Fruit]. For information about how to generate the app, you can apply similar principles in the topic about
Common Data Service to SQL Server.
The gallery's Items property is set to a formula that contains SortByColumns and Search functions, both of
which can be delegated.
In the search box, type "Apple".
Marching dots appear momentarily near the top of the screen as the app communicates with SQL Server to
process the search request. All records that meet the search criteria appear, even if the data source contains
millions of records.
The search results include "Apples", "Crab apples", and "Pineapple" because the Search function looks
everywhere in a text column. If you wanted to find only records that contain the search team at the start of the
fruit's name, you can use another delegable function, Filter, with a more complicated search term. (For
simplicity, remove the SortByColumns call.)

The new results include "Apples" but not "Crab apples" or "Pineapple". However, a yellow triangle appears
next to the gallery (and in the screen thumbnail if the left navigation bar shows thumbnails), and a blue, wavy
line appears under a portion of the formula. Each of these elements indicate a warning. If you hover over the
yellow triangle next to the gallery, this message appears:

SQL Server is a delegable data source, and Filter is a delegable function, However, Mid and Len can't be
delegated to any data source.
But it worked, didn't it? Well, kind of. And that is why this is a warning and not a red, wavy squiggle.
If the table contains fewer than 500 records, the formula worked perfectly. All records were brought to the
device, and Filter was applied locally.
If the table contains more than 500 records, the formula won't return record 501 or higher, even if it
matches the criteria.
Manage an on-premises data gateway in PowerApps
8/24/2018 • 2 minutes to read • Edit Online

Install an on-premises data gateway to transfer data quickly and securely between a canvas app that's built in
PowerApps and a data source that isn't in the cloud, such as an on-premises SQL Server database or an on-
premises SharePoint site. View all gateways for which you have administrative permissions, and manage
permissions and connections for those gateways.
With a gateway, you can connect to on-premises data over these connections:
SharePoint
SQL Server
Oracle
Informix
Filesystem
DB2

Prerequisites
The user name and password that you used to sign up for PowerApps.
Administrative permissions on a gateway. (You have these permissions by default for each gateway that you
install, and an administrator of another gateway can grant you these permissions for that gateway.)
A license that supports accessing on-premises data using an on-premises gateway. For more information, see
the “Connectivity” section of the pricing page.
Gateways and on-premises connections can only be created and used in the user's default environment.

Install a gateway
1. In the left navigation bar of powerapps.com, click or tap Gateways.

2. If you don't have administrative permissions for a gateway, click or tap Install a gateway now (or New
Gateway in the upper-right corner), and then follow the prompts in the wizard that appears.

For details about how to install a gateway, see Understand on-premises data gateways.
View and manage gateway permissions
1. In the left navigation bar of powerapps.com, click or tap Gateways, and then click or tap a gateway.
2. Add a user to a gateway by clicking or tapping Users, specifying a user or group, and then specifying a
permission level:
Can use: Users who can create connections on the gateway to use for apps and flows, but cannot share
the gateway. Use this permission for users who will run apps but not share them.
Can use + share: Users who can create a connection on the gateway to use for apps and flows, and
automatically share the gateway when sharing an app. Use this permission for users who need to share
apps with other users or with the organization.
Admin: Administrators who have full control of the gateway, including adding users, setting
permissions, creating connections to all available data sources, and deleting the gateway.
For Can use and Can use + share permission levels, select the data sources that the user can connect to over the
gateway.

View and manage gateway connections


1. In the left navigation bar of powerapps.com, click or tap Gateways, and then click or tap a gateway.
2. Click or tap Connections, and then click or tap a connection to view its details, edit the settings, or delete it.
3. To share a connection, click or tap Share, and then add or remove users.

NOTE
You can share only some types of connections, such as SQL Server. For more information, see Share app resources.

For more information about how to manage a connection, see Manage your connections.

Troubleshooting and Advanced Configuration


For more information on troubleshooting issues with gateways, or configuring the gateway service for your
network, see Understand on-premises data gateways.

Next steps
Create an app that connects to an on-premises data source, such as SQL Server or SharePoint.
Share an app that connects to an on-premises data source.
Understand on-premises data gateways for canvas
apps
12/7/2018 • 10 minutes to read • Edit Online

Installation and configuration


Prerequisites
Minimum:
.NET 4.5 Framework
64-bit version of Windows 7 or Windows Server 2008 R2 (or later)
Recommended:
8 Core CPU
8 GB Memory
64-bit version of Windows 2012 R2 (or later)
Related considerations:
You can't install a gateway on a domain controller.
You shouldn't install a gateway on a computer, such a laptop, that may be turned off, asleep, or not connected
to the Internet because the gateway can't run under any of those circumstances. In addition, gateway
performance might suffer over a wireless network.
Install a gateway
1. Download the installer, and then run it.

2. On the first screen of the installation wizard, click or tap Next to acknowledge the reminder about
installing a gateway on a laptop.
3. Specify the location where you want to install the gateway, select the check box to accept the terms of use
and the privacy statement, and then click or tap Install.
4. In the User Account Control dialog boxes, click or tap Yes to continue.
5. On the next screen of the wizard, click or tap Sign in, and then provide the same credentials that you use
to sign in to PowerApps.

6. Click or tap the option to register a new gateway or to migrate, restore, or take over an existing gateway,
and then click or tap Next.
To configure a gateway, type a name for it and a recovery key, click or tap Configure, and then
click or tap Close.

Specify a recovery key that contains at least eight characters, and keep it in a safe place. You'll need
this key if you want to migrate, restore, or take over its gateway.
To migrate, restore, or take over an existing gateway, provide the name of the gateway and its
recovery key, click or tap Configure, and then follow any additional prompts.
Restart the gateway
The gateway runs as a Windows service, so you can start and stop it in multiple ways. For example, you can open
a command prompt with elevated permissions on the machine where the gateway is running and then run either
of these commands:
To stop the service, run this command:
net stop PBIEgwService
To start the service, run this command:
net start PBIEgwService
Configure a firewall or proxy
For information about how to provide proxy information for your gateway, see Configure proxy settings.
You can verify whether your firewall, or proxy, may be blocking connections by running the following command
from a PowerShell prompt. This command will test connectivity to the Azure Service Bus. This only tests network
connectivity and doesn't have anything to do with the cloud server service or the gateway. It helps to determine
whether your machine can actually get out to the internet.
Test-NetConnection -ComputerName watchdog.servicebus.windows.net -Port 9350
The results should look similar to this example. If TcpTestSucceeded is not True, you may be blocked by a
firewall.

ComputerName : watchdog.servicebus.windows.net
RemoteAddress : 70.37.104.240
RemotePort : 5672
InterfaceAlias : vEthernet (Broadcom NetXtreme Gigabit Ethernet - Virtual Switch)
SourceAddress : 10.120.60.105
PingSucceeded : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : True

If you want to be exhaustive, substitute the ComputerName and Port values with those listed under Configure
ports later in this topic.
The firewall may also be blocking the connections that the Azure Service Bus makes to the Azure data centers. If
that's the case, you'll want to whitelist (unblock) the IP addresses for your region for those data centers. You can
get a list of Azure IP addresses here.
Configure ports
The gateway creates an outbound connection to Azure Service Bus. It communicates on outbound ports: TCP 443
(default), 5671, 5672, 9350 thru 9354. The gateway doesn't require inbound ports.
Learn more about hybrid solutions.
It is recommended that you whitelist the IP addresses, for your data region, in your firewall. You can download
the Microsoft Azure Datacenter IP list, which is updated weekly.

NOTE
In the Azure Datacenter IP list, addresses are listed in CIDR notation. For example, 10.0.0.0/24 doesn't mean 10.0.0.0
through 10.0.0.24.

Here is a listing of the fully qualified domain names used by the gateway.

DOMAIN NAMES OUTBOUND PORTS DESCRIPTION

*.analysis.windows.net 443 HTTPS

*.login.windows.net 443 HTTPS

*.servicebus.windows.net 5671-5672 Advanced Message Queuing Protocol


(AMQP)

*.servicebus.windows.net 443, 9350-9354 Listeners on Service Bus Relay over TCP


(requires 443 for Access Control token
acquisition)

*.frontend.clouddatahub.net 443 HTTPS

*.core.windows.net 443 HTTPS

*login.microsoftonline.com 443 HTTPS

*.msftncsi.com 443 Used to test internet connectivity if the


gateway is unreachable by the Power BI
service.

Sign-in account
Users will sign in with either a work or school account. This is your organization account. If you signed up for an
Office 365 offering and didn’t supply your actual work email, it may look like [email protected].
Your account, within a cloud service, is stored within a tenant in Azure Active Directory (AAD ). In most cases, your
AAD account’s UPN will match the email address.
Windows Service account
The on-premises data gateway is configured to use NT SERVICE\PBIEgwService for the Windows service logon
credential. By default, it has the right of Log on as a service. This is in the context of the machine on which you're
installing the gateway.
This isn't the account used to connect to on-premises data sources or the work or school account with which you
sign in to cloud services.
If you encounter issues with your proxy server due to authentication, you may want to change the Windows
service account to a domain-user or managed-service account as proxy configuration describes.

Tenant level administration


There is currently no single place where tenant administrators can manage all the gateways that other users have
installed and configured. If you’re a tenant administrator, we recommend that you ask the users in your
organization to add you as an administrator to every gateway they install. This allows you to manage all the
gateways in your organization through the Gateway Settings page or through PowerShell commands.

Frequently asked questions


General
Question: What data sources does the gateway support?
Answer: As of this writing:
SQL Server
SharePoint
Oracle
Informix
Filesystem
DB2
Question: Do I need a gateway for data sources in the cloud, such as SQL Azure?
Answer: No. A gateway connects to on-premises data sources only.
Question: What is the actual Windows service called?
Answer: In Services, the gateway is called Power BI Enterprise Gateway Service.
Question: Are there any inbound connections to the gateway from the cloud?
Answer: No. The gateway uses outbound connections to Azure Service Bus.
Question: What if I block outbound connections? What do I need to open?
Answer: Refer to the list of ports and hosts that the gateway uses above.
Question: Does the gateway have to be installed on the same machine as the data source?
Answer: No. The gateway will connect to the data source using the connection information that was provided.
Think of the gateway as a client application in this sense. It will just need to be able to connect to the server name
that was provided.
Question: What is the latency for running queries to a data source from the gateway? What is the best
architecture?
Answer: To reduce network latency, install the gateway as close to the data source as possible. If you can install
the gateway on the actual data source, it will minimize the latency introduced. Consider the data centers as well.
For example, if your service is using the West US data center and you have SQL Server hosted in an Azure VM,
you'll want to have the Azure VM in West US as well. This will minimize latency and avoid egress charges on the
Azure VM.
Question: Are there any requirements for network bandwidth?
Answer: It is recommended to have good throughput for your network connection. Every environment is
different, and the amount of data being sent will affect the results. Using ExpressRoute could help to guarantee a
level of throughput between on-premises and the Azure data centers.
You can use the third-party tool Azure Speed Test app to help gauge what your throughput is.
Question: Can the gateway Windows service run with an Azure Active Directory account?
Answer: No. The Windows service must have a valid Windows account. By default, it will run with the Service
SID, NT SERVICE\PBIEgwService.
Question: How are results sent back to the cloud?
Answer: This is done by way of the Azure Service Bus. For more information, see how it works.
Question: Where are my credentials stored?
Answer: The credentials that you enter for a data source are stored encrypted in the gateway cloud service. The
credentials are decrypted at the gateway on-premises.
Question: Can I place the gateway in a perimeter network (also known as DMZ, demilitarized zone, and screened
subnet)?
Answer: The gateway requires connectivity to the data source. If the data source isn't in your perimeter network,
the gateway may not be able to connect to it. For example, the computer that's running SQL Server may not be in
your perimeter network, and you can't connect to that computer from the perimeter network. If you placed the
gateway in your perimeter network, the gateway wouldn't be able to reach the computer that's running SQL
Server.
High availability/disaster recovery
Question: Are there any plans for enabling high availability scenarios with the gateway?
Answer: High availability is enabled by joining 2 or more gateways into the same cluster. High availability
gateway clusters require the November 2017 update to on-premises data gateway, or later. See the blog post
announcement for more details.
Question: What options are available for disaster recovery?
Answer: You can use the recovery key to restore or move a gateway. When you install the gateway, specify the
recovery key.
Question: What is the benefit of the recovery key?
Answer: It provides a way to migrate or recover your gateway settings after a disaster.
Troubleshooting
Question: Where are the gateway logs?
Answer: See Tools later in this topic.
Question: How can I see what queries are being sent to the on-premises data source?
Answer: You can enable query tracing, which will include the queries being sent. Remember to change it back to
the original value when done troubleshooting. Leaving query tracing enabled will cause the logs to be larger.
You can also look at tools that your data source has for tracing queries. For example, you can use Extended Events
or SQL Profiler for SQL Server and Analysis Services.

How the gateway works


When a user interacts with an element that's connected to an on-premises data source:
1. The cloud service creates a query, along with the encrypted credentials for the data source, and sends the
query to the queue for the gateway to process.
2. The gateway cloud service analyzes the query and pushes the request to the Azure Service Bus.
3. The on-premises data gateway polls the Azure Service Bus for pending requests.
4. The gateway gets the query, decrypts the credentials, and connects to the data source(s) with those
credentials.
5. The gateway sends the query to the data source for execution.
6. The results are sent from the data source back to the gateway and then onto the cloud service. The service
then uses the results.

Troubleshooting
Update to the latest version
A lot of issues can surface when the gateway version is out of date. It is a good general practice to make sure you
are on the latest version. If you haven't updated the gateway for a month, or longer, you may want to consider
installing the latest version of the gateway and see if you can reproduce the issue.
Error: Failed to add user to group. (-2147463168 PBIEgwService Performance Log Users )
You may receive this error if you are trying to install the gateway on a domain controller, which isn't supported.
You'll need to deploy the gateway on a machine that isn't a domain controller.

Tools
Collecting logs from the gateway configurator
You can collect several logs for the gateway. Always start with the logs!
Installer logs
%localappdata%\Temp\On-premises_data_gateway_*.log
Configuration logs
%localappdata%\Microsoft\on-premises data gateway\GatewayConfigurator*.log
Enterprise gateway service logs
C:\Users\PBIEgwService\AppData\Local\Microsoft\on-premises data gateway\Gateway*.log
Event logs
The On-premises data gateway service event logs are present under Applications and Services Logs.

Fiddler Trace
Fiddler is a free tool from Telerik that monitors HTTP traffic. You can see the back and forth with the Power BI
service from the client machine. This may show errors and other related information.
Understand data sources for canvas apps in
PowerApps
3/4/2019 • 10 minutes to read • Edit Online

In PowerApps, most canvas apps use external information stored in cloud services called Data Sources.
A common example is a table in an Excel file stored in OneDrive for Business. Apps access these data
sources by using Connections.
This article discusses the different kinds of data sources and how to work with table data sources.
It's easy to create an app that does basic reading and writing to a data source. But sometimes you want
more control over how data flows in and out of your app. This article describes how the Patch,
DataSourceInfo, Validate, and Errors functions provide more control.

Kinds of data sources


Data sources can be connected to a cloud service, or they can be local to an app.
Connected data sources
The most common data sources are tables, which you can use to retrieve and store information. You can
use connections to data sources to read and write data in Microsoft Excel workbooks, SharePoint lists,
SQL tables, and many other formats, which can be stored in cloud services such as OneDrive for
Business, DropBox, and SQL Server.
Data sources other than tables include email, calendars, Twitter, and notifications, but this article doesn't
discuss these other kinds of data sources.
Local data sources
Using the Gallery, Display form, and Edit form controls, it is easy to create an app that reads and
writes data from a data source. To get started, read the article Understand data forms.
When you ask PowerApps to create an app from data, these controls are used. Behind the scenes, the app
uses an internal table to store and manipulate the data that comes from the data source.
A special kind of data source is the Collection, which is local to the app and not backed by a connection to
a service in the cloud, so the information can not be shared across devices for the same user or between
users. Collections can be loaded and saved locally.
Kinds of tables
Tables that are internal to a PowerApps app are fixed values, just as a number or a string is a value.
Internal tables aren't stored anywhere, they just exist in your app's memory. You can't directly modify the
structure and data of a table. What you can do instead is to create a new table through a formula: you use
that formula to make a modified copy of the original table.
External tables are stored in a data source for later retrieval and sharing. PowerApps provides
"connections" to read and write stored data. Within a connection, you can access multiple tables of
information. You'll select which tables to use in your app, and each will become a separate data source.
To learn more, Working with tables goes into more detail about internal tables, but it is also applicable to
external tables residing in a cloud service.
Working with tables
You can use table data sources the same way that you use an internal PowerApps table. Just like an
internal table, each data source has records, columns, and properties that you can use in formulas. In
addition:
The data source has the same column names and data types as the underlying table in the
connection.

NOTE
For SharePoint and Excel data sources that contain column names with spaces, PowerApps will replace the
spaces with "_x0020_". For example, "Column Name" in SharePoint or Excel will appear as
"Column_x0020_Name" in PowerApps when displayed in the data layout or used in a formula.

The data source is loaded from the service automatically when the app is loaded. You can force the
data to refresh by using the Refresh function.
As users run an app, they can create, modify, and delete records and push those changes back to
the underlying table in the service.
Records can be created with the Patch and Collect functions.
Records can be modified with the Patch, Update, and UpdateIf functions.
Records can be removed with the Remove and RemoveIf functions.
Errors when working with a data source are available through the Errors function.
The DataSourceInfo, Defaults, and Validate functions provide information about the data
source that you can use to optimize the user experience.
Creating data sources
PowerApps can't be used to create a connected data source, or modify its structure; the data source must
already exist in a service somewhere. For example, to create a table in an Excel workbook stored on
OneDrive, you first use Excel Online on OneDrive to create a workbook. Next you create a connection to
it from your app.
However, collection data sources can be created and modified inside an app, but are only temporary.
Display one or more records

The diagram above shows the flow of information when an app reads the information in a data source:
The information is stored and shared through a storage service (in this case, a SharePoint list of an
Office 365 site).
A connection makes this information available to the app. The connection takes care of authentication
of the user to access the information.
When the app is started or the Refresh function is pressed, information is drawn from the connection
into a data source in the app for local use.
Formulas are used to read the information and expose it in controls that the user can see. You can
display the records of a data source by using a gallery on a screen and wiring the Items property to
the data source: Gallery.Items = DataSource. You wire controls within the gallery, to the gallery,
using the controls' Default property.
The data source is also a table. So you can use Filter, Sort, AddColumns, and other functions to
refine and augment the data source before using it as a whole. You can also use the Lookup, First,
Last, and other functions to work with individual records.
Modify a record
In the preceding section, you saw how to read a data source. Note that the arrows in the diagram above
are one way. Changes to a data source aren't pushed back through the same formulas in which the data
was retrieved. Instead, new formulas are used. Often a different screen is used for editing a record than
for browsing records, especially on a mobile device.
Note that, to modify an existing record of a data source, the record must have originally come from the
data source. The record may have traveled through a gallery, a context variable, and any number of
formulas, but its origin should be traceable back to the data source. This is important because additional
information travels with the record that uniquely identifies it, ensuring that you modify the correct record.

The diagram above shows the flow of information to update a data source:
An Edit form control provides a container for input cards, which are made up of user input controls
such as a text-input control or a slider. The DataSource and Item properties are used to identify the
record to edit.
Each input card has a Default property, which is usually set to the field of the form's ThisItem record.
The controls within the input card will then take their input values from Default. Normally you do not
need to modify this.
Each input card exposes an Update property. This property maps the user's input to a specific field of
the record for writing back to the data source. Normally you do not need to modify this.
A button or an image control on the screen enables the user to save changes to the record. The
OnSelect formula of the control calls the SubmitForm function to do this work. SubmitForm reads
all the Update properties of the cards and uses this to write back to the data source.
Sometimes there will be issues. A network connection may be down, or a validation check is made by
the service that the app didn't know about. The Error and ErrorKind properties of the form control
makes this information available, so you can display it to the user.
For more fine grained control over the process, you can also use the Patch and Errors function. The Edit
form control exposes an Updates property so that you can read the values of the fields within the form.
You can also use this property to call a custom connector on a connection, completely bypassing the
Patch and SubmitForm functions.
Validation
Before making a change to a record, the app should do what it can to make sure the change will be
acceptable. There are two reasons for this:
Immediate feedback to the user. The best time to fix a problem is right when it happens, when it is
fresh in the user's mind. Literally with each touch or keystroke, red text can appear that identifies an
issue with their entry.
Less network traffic and less user latency. More issues detected in the app means fewer conversations
over the network to detect and resolve issues. Each conversation takes time during which the user
must wait before they can move on.
PowerApps offers two tools for validation:
The data source can provide information about what is and isn't valid. For example, numbers can have
minimum and maximum values, and one or more entries can be required. You can access this
information with the DataSourceInfo function.
The Validate function uses this same information to check the value of a single column or of an entire
record.
Error handling
Great, you've validated your record. Time to update that record with Patch!
But, alas, there may still be a problem. The network is down, validation at the service failed, or the user
doesn't have the right permissions, just to name a few of the possible errors your app may encounter. It
needs to respond appropriately to error situations, providing feedback to the user and a means for them
to make it right.
When errors occur with a data source, your app automatically records the error information and makes it
available through the Errors function. Errors are associated with the records that had the problems. If the
problem is something the user can fix, such as a validation problem, they can resubmit the record, and
the errors will be cleared.
If an error occurs when a record is created with Patch or Collect, there is no record to associate any
errors with. In this case, blank will be returned by Patch and can be used as the record argument to
Errors. Creation errors are cleared with the next operation.
The Errors function returns a table of error information. This information can include the column
information, if the error can be attributed to a particular column. Use column-level error messages in
label controls that are close to where the column is located on the edit screen. Use record-level error
messages where the Column in the error table is blank, in a location close to the Save button for the
entire record.
Working with large data sources
When you are creating reports from large data sources (perhaps millions of records), you want to
minimize network traffic. Let's say you want to report on all Customers having a StatusCode of
"Platinum" in New York City. And that your Customers table contains millions of records.
You do not want to bring those millions of Customers into your app, and then choose the ones you want.
What you want is to have that choosing happen inside the cloud service where your table is stored, and
only send the chosen records over the network.
Many, but not all, functions that you can use to choose records can be delegated, which means that they
are run inside the cloud service. You can learn how to do this by reading about Delegation.

Collections
Collections are a special kind of data source. They're local to the app and not backed by a connection to a
service in the cloud, so the information can not be shared across devices for the same user or between
users. They operate like any other data source, with a few exceptions:
Collections can be created dynamically with the Collect function. They don't need to be established
ahead of time, as connection-based data sources do.
The columns of a collection can be modified at any time using the Collect function.
Collections allow duplicate records. More than one copy of the same record can exist in a collection.
Functions such as Remove will operate on the first match they find, unless the All argument is
supplied.
You can use the SaveData and LoadData functions to save and reload a copy of the collection. The
information is stored in a private location that other users, apps, or devices can't access.
You can use the Export and Import controls to save and reload a copy of the collection to a file that
the user can interact with.
For more information on working with a collection as a data source, see create and update a collection.
Collections are commonly used to hold global state for the app. See working with variables for the
options available for managing state.
Understand canvas-app tables and records
in PowerApps
8/16/2019 • 17 minutes to read • Edit Online

In PowerApps, you can create a canvas app that accesses information in Microsoft Excel,
SharePoint, SQL Server, and several other sources that store data in records and tables. To work
most effectively with this kind of data, review the concepts that underlie these structures.
A record contains one or more categories of information about a person, a place, or a thing.
For example, a record might contain the name, the email address, and the phone number of a
single customer. Other tools refer to a record as a "row" or an "item."
A table holds one or more records that contain the same categories of information. For
example, a table might contain the names, the email addresses, and the phone numbers of 50
customers.
In your app, you'll use formulas to create, update, and manipulate records and tables. You'll
probably read and write data to an external data source, which is an extended table. In addition,
you might create one or more internal tables, which are called collections.
You can build a variety of formulas that take the name of a table as an argument, just as a
formula in Excel takes one or more cell references as arguments. Some formulas in PowerApps
return a table that reflects the other arguments that you specify. For example, you might create a
formula:
to update a record in a table by specifying that table as one of multiple arguments for the
Patch function
to add, remove, and rename columns in a table by specifying that table as an argument for
the AddColumns, DropColumns, or RenameColumns function. None of those functions
modifies the original table. Instead, the function returns another table based on the other
arguments that you specify.

Elements of a table

Records
Each record contains at least one category of information for a person, a place, or a thing. The
example above shows a record for each product (Chocolate, Bread, and Water) and a column
for each category of information (Price, Quantity on Hand, and Quantity on Order).
In a formula, you can refer to a record by itself, outside of a table's context, by using curly braces.
For example, this record { Name: "Strawberries", Price: 7.99 } isn't associated with a table.
Note that field names, such as Name and Price in that example, aren't enclosed in double
quotation marks.
Fields
A field is an individual piece of information in a record. You can visualize this sort of field as a
value in a column for a particular record.
Just as with a control, you refer to a field of a record by using the . operator on the record. For
example, First(Products).Name returns the Name field for the first record in the Products
table.
A field can contain another record or table, as the example for the GroupBy function shows. You
can nest as many levels of records and tables as you want.
Columns
A column refers to the same field for one or more records in a table. In the above example, each
product has a price field, and that price is in the same column for all products. The above table
has four columns, shown horizontally across the top:
Name
Price
Quantity on Hand
Quantity on Order
The column's name reflects the fields in that column.
All values within a column are of the same data type. In the above example, the "Quantity on
Hand" column always contains a number and can't contain a string, such as "12 units," for one
record. The value of any field may also be blank.
You may have referred to columns as "fields" in other tools.

NOTE
For SharePoint and Excel data sources that contain column names with spaces, PowerApps will replace
the spaces with "_x0020_". For example, "Column Name" in SharePoint or Excel will appear as
"Column_x0020_Name" in PowerApps when displayed in the data layout or used in a formula.

Table
A table comprises one or more records, each with multiple fields that have consistent names
across the records.
Any table that's stored in a data source or a collection has a name, which you use to refer to the
table and pass it to functions that take tables as arguments. Tables can also be the result of a
function or a formula.
As in the following example, you can express a table in a formula by using the Table function
with a set of records, which you express in curly braces:
Table( { Value: "Strawberry" }, { Value: "Vanilla" } )

You can also define a single-column table with square brackets. An equivalent way to write the
above:
[ "Strawberry", "Vanilla" ]
Table formulas
In Excel and PowerApps, you use formulas to manipulate numbers and strings of text in similar
ways:
In Excel, type a value, such as 42, in cell A1, and then type a formula, such as A1+2, in
another cell to show the value of 44.
In PowerApps, set the Default property of Slider1 to 42, and set the Text property of a label
to Slider1.Value + 2 to show the value of 44.
In both cases, the calculated value changes automatically if you change the values of the
arguments (for example, the number in cell A1 or the value of Slider1).
Similarly, you can use formulas to access and manipulate data in tables and records. You can use
names of tables as arguments in some formulas, such as Min(Catalog, Price) to show the
lowest value in the Price column of the Catalog table. Other formulas provide whole tables as
return values, such as RenameColumns(Catalog, "Price", "Cost"), which returns all the
records from the Catalog table but changes the name of the Price column to Cost.
Just as with numbers, formulas that involve tables and records are automatically recalculated as
the underlying table or record changes. If the cost of a product in the Catalog table is lowered
below the previous minimum, the return value of the Min formula will automatically change to
match it.
Let's walk through some simple examples.
1. Create a blank app for a phone, and add a vertical Gallery control that contains other
controls.
By default, the screen shows placeholder text from a table named
CustomGallerySample. The Items property of the screen's Gallery control is
automatically set to that table.
NOTE
Some controls have been rearranged and enlarged for illustration purposes.

2. Instead of setting the Items property to the name of a table, set it to a formula that
includes the name of the table as an argument, as in this example:
Sort(CustomGallerySample, SampleHeading, Descending)

This formula incorporates the Sort function, which takes the name of a table as its first
argument and the name of a column in that table as its second argument. The function
also supports an optional third argument, which stipulates that you want to sort the data
in descending order.

3. Set the Items property to a formula that takes the formula from the previous step as an
argument and returns a table, as in this example:
FirstN(Sort(CustomGallerySample, SampleHeading, Descending), 2)

In this formula, you use the FirstN function to show a particular number of records in a
table. You use the Sort function as the first argument to FirstN and a number (in this
case, 2) as the second argument, which specifies how many records to show.
The entire formula returns a table that contains the first two records of the
CustomGallerySample table, sorted by the SampleHeading column in descending
order.
Table functions and control properties
Consider the Lower function. If the variable welcome contains the text string "Hello, World",
the formula Lower( welcome ) returns "hello, world". This function doesn't, in any way,
change the value in that variable. Lower is a pure function in that it only processes input and
produces output. That's all; it has no side effects. All functions in Excel and most functions in
PowerApps are pure functions, which allow the workbook or the app to be recalculated
automatically.
PowerApps offers a set of functions that operate on tables in the same manner. These functions
take tables as input and filter, sort, transform, reduce, and summarize entire tables of data. In
fact, Lower and many other functions that typically take a single value can also take a single-
column table as input.
Sort, Filter - Sorts and filters records.
FirstN, LastN - Returns the first N or last N records of the table.
Abs, Sqrt, Round, RoundUp, RoundDown - Arithmetic operations on each record of a
single-column table, resulting in a single-column table of results.
Left, Mid, Right, Replace, Substitute, Trim, Lower, Upper, Proper - String manipulations
on each record of a single-column table, resulting in a single-column table of strings.
Len - For a column of strings, returns a single-column table that contains the length of each
string.
Concatenate - Concatenates multiple columns of strings, resulting in a single-column table
of strings.
AddColumns, DropColumns, RenameColumns, ShowColumns - Column manipulation
of the table, resulting in a new table with different columns.
Distinct - Removes duplicates records.
Shuffle - Shuffles records into a random order.
HashTags - Searches for hashtags in a string.
Errors - Provides error information when you work with a data source.
Many of these functions take a single-column table as their input. If an entire table has only one
column, you can specify it by name. If a table has multiple columns, you can specify one of those
columns by using Table.Column syntax. For example, Products.Name returns the single-
column table of only Name values from the Products table.
You can completely reshape a table however you want by using the AddColumns,
RenameColumns, ShowColumns, or DropColumns function. Again, these functions change
only their output, not their source.
Properties of controls can also be tables:
Items - Applies to galleries, list boxes, and combo boxes. This property defines the table that
the gallery or the list shows.
SelectedItems - Applies to list boxes and combo boxes. This property defines the table of
items that the user has selected if SelectMultiple is enabled.

Behavioral formulas
Other functions are specifically designed to modify data and have side effects. Because these
functions aren't pure, you must build them carefully, and they can't participate in automatically
recalculating values in the app. You can use these functions only within behavioral formulas.
Collect, Clear, ClearCollect - Creates collections, clears them, and adds data to them.
Patch - Modifies one or more fields in a record.
Update, UpdateIf - Updates records that match one or more criteria that you specify.
Remove, RemoveIf - Deletes records that match one or more criteria that you specify.

Record formulas
You can also build a formula that calculates data for an individual record, takes an individual
record as an argument, and provides an individual record as a return value. Returning to our
gallery example above, let's use the Gallery1.Selected property to display information from
whatever record the user selects in that gallery.
1. Add a Button, and set its OnSelect property to this formula:
Collect( SelectedRecord, Gallery1.Selected )
2. While holding down the Alt key, select the button.
3. In the File menu, select Collections.

This formula returns a record that includes not only the data from the record that's currently
selected in the gallery but also each control in that gallery. For example, the record contains both
a SampleText column, which matches the SampleText column in the original table, and a
Subtitle1 column, which represents the label that shows the data from that column. Select the
table icon in the Subtitle1 column to drill into that data.
NOTE
The Subtitle1 column might be named Subtitle2 or similar if you've added elements other than those
that this topic specifies.

Now that you have the selected record, you can extract individual fields from it with the .
operator.
1. Add a Label control, and then move it under the gallery and the button.
2. Set the label's Text property to this expression:
"Selected: " & Gallery1.Selected.SampleHeading

You've taken the Selected property, which is a record, and extracted the SampleHeading
property from it.
You can also use a record as a general-purpose container for related named values.
If you build a formula around the UpdateContext and Navigate functions, use a record to
gather the context variables that you want to update.
Use the Updates property on an Edit form control to gather the changes that have been
made by the user in a form.
Use the Patch function to update a data source but also to merge records.
In these cases, the record was never a part of a table.

Record functions and control properties


Functions that return records:
FirstN, LastN - Returns the first or last record or records of the table.
Lookup - Returns the first record from a table that matches one or more criteria.
Patch - Updates a data source or merges records.
Defaults - Returns the default values for a data source.
Properties that return records:
Selected - Applies to galleries and list boxes. Returns the currently selected record.
Updates - Applies to galleries. Pulls together all the changes that a user makes in a data-
entry form.
Update - Applies to input controls such as text-input controls and sliders. Sets up individual
properties for the gallery to pull together.

Record scope
Some functions operate by evaluating a formula across all the records of a table individually.
The formula's result is used in various ways:
AddColumns - Formula provides the value of the added field.
Average, Max, Min, Sum, StdevP, VarP - Formula provides the value to aggregate.
Filter, Lookup - Formula determines if the record should be included in the output.
Concat - Formula determines the strings to concatenate together.
Distinct - Formula returns a value, used to identify duplicate records.
ForAll - Formula can return any value, potentially with side effects.
Sort - Formula provides the value to sort the records on.
With - Formula can return any value, potentially with side effects.
Inside these formulas, you can reference the fields of the record being processed. Each of these
functions creates a "record scope" in which the formula is evaluated, where the fields of the
record are available as top-level identifiers. You can also reference control properties and other
values from throughout your app.
For example, take a table of Products:

To create this example table in your app, insert a button, set its OnSelect property to this
formula, and then select the button (click it while you hold down the Alt key in PowerApps
Studio):

Set( Products,
Table(
{ Product: "Widget", 'Quantity Requested': 6, 'Quantity Available': 3 },
{ Product: "Gadget", 'Quantity Requested': 10, 'Quantity Available': 20 },
{ Product: "Gizmo", 'Quantity Requested': 4, 'Quantity Available': 11 },
{ Product: "Apparatus", 'Quantity Requested': 7, 'Quantity Available': 6 }
)
)

To determine whether any of any of these products had more requested than is available:
Filter( Products, 'Quantity Requested' > 'Quantity Available' )

The first argument to Filter is the table of records to operate on, and the second argument is a
formula. Filter creates a record scope for evaluating this formula in which the fields of each
record are available, in this case Product, Quantity Requested, and Quantity Available. The
result of the comparison determines if each record should be included in the result of the
function:

Adding to this example, we can calculate how much of each product to order:

AddColumns(
Filter( Products, 'Quantity Requested' > 'Quantity Available' ),
"Quantity To Order", 'Quantity Requested' - 'Quantity Available'
)

Here we are adding a calculated column to the result. AddColumns has its own record scope
that it uses to calculate the difference between what has been requested and what is available.

Finally, we can reduce the result table to just the columns that we want:

ShowColumns(
AddColumns(
Filter( Products, 'Quantity Requested' > 'Quantity Available' ),
"Quantity To Order", 'Quantity Requested' - 'Quantity Available'
),
"Product",
"Quantity To Order"
)

Note that in the above, we used double quotes (") in some places and single quotes (') in other
places. Single quotes are required when referencing the value of an object, such as a field or
table, in which the name of the object contains a space. Double quotes are used when we are not
referencing the value of an object but instead talking about it, especially in situations in which
the object does not yet exist, as in the case of AddColumns.

Disambiguation
Field names added with the record scope override the same names from elsewhere in the app.
When this happens, you can still access values from outside the record scope with the @
disambiguation operator:
To access values from nested record scopes, use the @ operator with the name of the table
being operated upon using this pattern:
Table[@FieldName]
To access global values, such as data sources, collections, and context variables, use the
pattern [@ObjectName] (without a table designation).
If the table being operated upon is an expression, such as Filter( Table, ... ), then the
disambiguation operator cannot be used. Only the innermost record scope can access fields
from this table expression, by not using the disambiguation operator.
For example, imagine having a collection X:

You can create this collection with ClearCollect( X, [1, 2] ).


And another collection Y:

You can create this collection with ClearCollect( Y, ["A", "B"] ).


In addition, define a context variable named Value with this formula: UpdateContext( {Value:
"!"} )
Let's put it all together. In this context, the following formula:

Ungroup(
ForAll( X,
ForAll( Y,
Y[@Value] & Text( X[@Value] ) & [@Value]
)
),
"Value"
)

produces this table:

What is going on here? The outermost ForAll function defines a record scope for X, allowing
access to the Value field of each record as it is processed. It can be accessed by simply using the
word Value or by using X[@Value].
The innermost ForAll function defines another record scope for Y. Since this table also has a
Value field defined, using Value here refers to the field in Y's record and no longer the one
from X. Here, to access X's Value field, we must use the longer version with the disambiguation
operator.
Since Y is the innermost record scope, accessing fields of this table do not require
disambiguation, allowing us to use this formula with the same result:
Ungroup(
ForAll( X,
ForAll( Y,
Value & Text( X[@Value] ) & [@Value]
)
),
"Value"
)

All the ForAll record scopes override the global scope. The Value context variable we defined
isn't available by name without the disambiguation operator. To access this value, use [@Value].
Ungroup flattens the result because nested ForAll functions result in a nested result table.

Single-column tables
To operate on a single column from a table, use the ShowColumns function as in this example:

ShowColumns( Products, "Product" )

This formula produces this single-column table:

For a shorter alternative, specify Table.Column, which extracts the single-column table of just
Column from Table. For example, this formula produces exactly the same result as using
ShowColumns.

Products.Product

Inline records
You express records by using curly braces that contain named field values. For example, you can
express the first record in the table at the start of this topic by using this formula:
{ Name: "Chocolate", Price: 3.95, 'Quantity on Hand': 12, 'Quantity on Order': 10 }

You can also embed formulas within other formulas, as this example shows:
{ Name: First(Products).Name, Price: First(Products).Price * 1.095 }

You can nest records by nesting curly braces, as this example shows:
{ 'Quantity': { 'OnHand': ThisItem.QuantOnHand, 'OnOrder': ThisItem.QuantOnOrder } }

Enclose each column name that contains a special character, such as a space or a colon, in single
quotes. To use a single quote within a column name, double it.
Note that the value in the Price column doesn't include a currency symbol, such as a dollar sign.
That formatting will be applied when the value is displayed.
Inline tables
You can create a table by using the Table function and a set of records. You can express the table
at the start of this topic by using this formula:

Table(
{ Name: "Chocolate", Price: 3.95, 'Quantity on Hand': 12, 'Quantity on Order': 10 },
{ Name: "Bread", Price: 4.95, 'Quantity on Hand': 34, 'Quantity on Order': 0 },
{ Name: "Water", Price: 4.95, 'Quantity on Hand': 10, 'Quantity on Order': 0 }
)

You can also nest tables:

Table(
{ Name: "Chocolate",
'Quantity History': Table( { Quarter: "Q1", OnHand: 10, OnOrder: 10 },
{ Quarter: "Q2", OnHand: 18, OnOrder: 0 } )
}
)

Inline value tables


You can create single-column tables by specifying values in square brackets. The resulting table
has a single column, named Value.
For example, [ 1, 2, 3, 4 ] is equivalent to
Table( { Value: 1 }, { Value: 2 }, { Value: 3 }, { Value: 4 } ) and returns this table:
Understand record references and polymorphic
lookups in canvas apps
5/21/2019 • 19 minutes to read • Edit Online

When you wrote a research paper in school, you probably provided a list of your references at the end. You didn't
include a copy of the actual background material you used but rather a web link, book title and author, or other
information so that someone could track down the original source. You mixed different kinds of sources in a single
list, newspaper articles next to audio recordings, each with their own specific details for a proper citation. For
example, Wikipedia articles often include a long list of references.
In canvas apps, you often work with copies of records downloaded from data sources. You use the LookUp and
Filter functions and the Gallery control's Selected property to identify the specific record that you want. All the
records from Filter or Selected will be of the same entity type, so you can use fields with a simple .Field notation.
These copies often include reference information so you can use the Patch function to update the original source.
Canvas apps also support record references. Much like a research-paper reference, a record reference refers to a
record without including a complete copy of it. Such a reference can refer to a record in any entity. Also like
research-paper references, you can mix records from different entities in a single column.
Many operations on record references are identical to working with records. You can compare record references to
each other and to full records. You can set a record reference's value with the Patch function just as you would a
lookup with a full record.
There is one important usage difference: you can't directly access the fields of a record reference without first
establishing to which entity it refers. This is because canvas apps require that all types be known when you write
formulas. Because you don't know the type of a record reference until the app is running, you can't use the simple
.Field notation directly. You must first dynamically determine the entity type with the IsType function and then use
.Field notation on the result of the AsType function.
Entity type refers to the schema of each record in an entity. Each entity has a unique set of fields with different
names and data types. Each record of the entity inherits that structure; two records have the same entity type if
they come from the same entity.

Polymorphic lookups
Common Data Service supports relationships between records. Each record in the Accounts entity has a Primary
Contact lookup field to a record in the Contacts entity. The lookup can only refer to a record in Contacts and
can't refer to a record in, say, the Teams entity. That last detail is important because you always know what fields
will be available for the lookup.
Common Data Service also supports polymorphic lookups, which can refer to a record from any entity in a set.
For example, the Owner field can refer to a record in the Users entity or the Teams entity. The same lookup field
in different records could refer to records in different entities. In this case, you don't always know what fields will
be available.
Canvas record references were designed for working with polymorphic lookups in Common Data Service. You can
also use record references outside of this context, which is how the two concepts differ.
In the next section, you'll start to explore these concepts by working with the Owner lookup.

Show the fields of a record owner


Every entity in Common Data Service includes an Owner field. This field can't be removed, you can't add another,
and it always requires a value.
To show that field in the Account entity:
1. Open this PowerApps site.
2. In the left navigation bar, select Data > Entities.
3. In the list of entities, select Account.
4. In the upper-right corner, open the filter list (which is set to Default by default), and then select All.
5. Scroll down until the Owner field appears.

This lookup field can refer to a record from either the Teams entity or the Users entity. Not every record in these
entities has permission to be an Owner; check the supported roles if you run into a problem.
This graphic shows a simple gallery of Accounts, where the Accounts entity has been added to the app as a data
source:

IMPORTANT
Throughout this topic, the graphics show some names and other values that aren't part of the sample data that ships with
Common Data Service. The steps accurately demonstrate how to configure controls for a particular result, but your
experience will vary based on the data for your organization.

To show the owner of each account in the gallery, you might be tempted to use the formula
ThisItem.Owner.Name. However, the name field in the Team entity is Team Name, and the name field in the
User entity is Full Name. The app can't know which type of lookup you're working with until you run the app, and
it can vary between records in the Accounts entity.
You need a formula that can adapt to this variance. You also need to add the data sources for the entity types that
Owner could be (in this case, Users and Teams). Add these three data sources to your app:

With these data sources in place, use this formula to display the name of either a user or a team:

If( IsType( ThisItem.Owner, [@Teams] ),


"Team: " & AsType( ThisItem.Owner, [@Teams] ).'Team Name',
"User: " & AsType( ThisItem.Owner, [@Users] ).'Full Name' )

In this formula, the IsType function tests the Owner field against the Teams entity. If it's of that entity type, the
AsType function casts it to a Team record. At this point, you can access all the fields of the Teams entity, including
Team Name, by using the .Field notation. If IsType determines that the Owner isn't a record in the Teams entity,
that field must be a record in the Users entity because the Owner field is required (can't be blank).
You're using the global disambiguation operator for [@Teams] and [@Users] to ensure that you're using the
global entity type. You don't need it in this case, but it's a good habit to form. One-to-many relationships often
conflict in the gallery's record scope, and this practice avoids that confusion.
To use any fields of a record reference, you must first use the AsType function to cast it to a specific entity type.
You can't access fields directly from the Owner field because the system doesn't know what entity type you want
to use.
The AsType function returns an error if the Owner field doesn't match the entity type being requested, so you can
use the IfError function to simplify this formula. First, turn on the experimental feature Formula-level error
management:

Then replace the previous formula with this one:

IfError(
"Team: " & AsType( ThisItem.Owner, [@Teams] ).'Team Name',
"User: " & AsType( ThisItem.Owner, [@Users] ).'Full Name' )

Filter based on an owner


Congratulations—you've finished the hardest aspect of working with a record reference. Other use cases are more
straightforward because they don't access fields of the record. As a case in point, take filtering, which you'll explore
in this section.
Add a Combo box control above the gallery, and set these properties of the new control:
Items: Users
SelectMultiple: false
To filter the gallery by a specific user selected from this combo box, set the gallery's Items property to this
formula:

Filter( Accounts, Owner = ComboBox1.Selected )

IMPORTANT
The instructions in this topic are accurate if you follow the steps exactly. However, any formula that refers to a control by its
name fails if the control has a different name. If you delete and add a control of the same type, the number at the end of the
control's name changes. For any formula that shows an error, confirm that it contains the correct names of all controls.

You don't need to use IsType or AsType because you're comparing record references to other record references
or to full records. The app knows the entity type of ComboBox1.Selected because it's derived from the Users
entity. Accounts for which the owner is a team won't match the filter criterion.
You can get a little fancier by supporting filtering by either a user or a team.
1. Make some space near the top of the screen by resizing the gallery and moving the combo box, insert a
Radio control above the gallery, and then set these properties for the new control:
Items: [ "All", "Users", "Teams" ]
Layout: Layout.Horizontal
2. For the Combo box control, set this property (if the combo box disappears, select Users in the radio
control):
Visible: Radio1.Selected.Value = "Users"
3. Copy and paste the Combo box control, move the copy directly over the original, and then set these
properties for the copy:
Items: Teams
Visible: Radio1.Selected.Value = "Teams"
The app will display only one combo box at a time, depending on the state of the radio control. Because
they're directly above one another, they'll appear to be the same control that changes its contents.
4. Finally, set the Items property of the Gallery control to this formula:

Filter( Accounts,
Radio1.Selected.Value = "All"
Or (Radio1.Selected.Value = "Users" And Owner = ComboBox1.Selected)
Or (Radio1.Selected.Value = "Teams" And Owner = ComboBox1_1.Selected)
)

With these changes, you can show all records or filter them based on either a user or a team:

The formula is fully delegable. The portion that's comparing the radio-button values is a constant across all
records and is evaluated before the rest of the filter is sent to Common Data Service.
If you want to filter on the type of the owner, you can use the IsType function, but it's not yet delegable.
Update the owner by using Patch
You can update the Owner field in the same manner as any other lookup. To set the currently selected account's
owner to the first team:

Patch( Accounts, Gallery1.Selected, { Owner: First( Teams ) } )

This approach doesn't differ from a normal lookup because the app knows the type of First( Teams ). If you want
the first user instead, replace that portion with First( Users ). The Patch function knows that the Owner field can
be set to either of these two entity types.
To add this capability to the app:
1. In the Tree view pane, select the Radio control and the two Combo box controls at the same time.
2. On the ellipsis menu, select Copy these items.
3. On the same menu, select Paste.

4. Move the copied controls to the right of the gallery.


5. Select the copied Radio control, and then change these properties:
Items: [ "Users", "Teams" ]
Default: If( IsType( Gallery1.Selected.Owner, Users ), "Users", "Teams" )

6. In the Radio control, select Users so that the Combo box control that lists users is visible.
7. Select the visible Combo box control, and then set the DefaultSelectedItems property to this formula:

If( IsType( Gallery1.Selected.Owner, Users ),


AsType( Gallery1.Selected.Owner, Users ),
Blank()
)
8. In the Radio control, select Teams so that the Combo box control that lists teams is visible.
9. Select the Radio control to take selection away from the now -invisible Combo box control for users.
10. Select the visible Combo box control for teams, and then set its DefaultSelectedItems property to this
formula:

If( IsType( Gallery1.Selected.Owner, Teams ),


AsType( Gallery1.Selected.Owner, Teams ),
Blank()
)

11. Insert a Button control, move it under the Combo box control, and then set the button's Text property to
"Patch Owner" .
12. Set the OnSelect property of the button to this formula:

Patch( Accounts, Gallery1.Selected,


{ Owner: If( Radio1_1.Selected.Value = "Users",
ComboBox1_2.Selected,
ComboBox1_3.Selected ) } )

The copied Radio and Combo box controls show the owner for the currently selected account in the gallery. With
the same controls, you can set the owner of the account to any team or user by selecting the button:

Show the owner by using a form


You can show an Owner field inside a form by adding a custom card. As of this writing, you can't change the value
of the field with a form control.
1. Insert an Edit form control, and then resize and move it to the lower-right corner.
2. On the Properties tab near the right side of the screen, open the Data source list, and then select
Accounts.

3. Set the form's Item property to Gallery1.Selected .

4. On the Properties tab near the right side of the screen, select Edit fields.
5. In the Fields pane, select the ellipsis, and then select Add a custom card.

The new card appears at the bottom of the form control.


6. Resize the card as needed to show all the text.

7. Insert a Label control into the custom card, and then set the label's Text property to the formula that you
used in the gallery:

If( IsType( ThisItem.Owner, Teams ),


"Team: " & AsType( ThisItem.Owner, Teams ).'Team Name',
"User: " & AsType( ThisItem.Owner, Users ).'Full Name' )

For each selection in the gallery, more fields of the account, including the record's owner, appear in the form. If you
change the owner by using the Patch button, the form control also shows that change.
Show the fields of a customer
In Common Data Service, the Customer lookup field is another polymorphic lookup that's very similar to Owner.
Owner is limited to one per entity, but entities can include zero, one, or more Customer lookup fields. The
Contacts system entity includes the Company Name field, which is a Customer lookup field.

You can add more Customer lookup fields to an entity by selecting the Customer data type for a new field.

A Customer lookup field can refer to a record from either the Accounts entity or the Contacts entity. You'll use
the IsType and AsType functions with these entities, so now is a good time to add them as data sources (you can
leave Teams and Users in place).
The treatment of the Customer and Owner fields is so similar that you can literally copy the app (File > Save as,
and then specify a different name) and make these simple replacements:

LOCATION OWNER SAMPLE CUSTOMER SAMPLE

Throughout Owner 'Customer Name'

Throughout Users Accounts

Throughout Teams Contacts

Gallery's Items property Accounts Contacts

Form's Items property Accounts Contacts

The first argument of Patch Accounts Contacts


in the button's OnSelect property

Filter radio's Items property [ "All", "Users", "Teams" ] [ "All", "Accounts", "Contacts" ]

Patch radio's Items property [ "Users", "Teams" ] [ "Accounts", "Contacts" ]

Combo box's Visible property "Users" and "Teams" "Accounts" and "Contacts"

For example, the new gallery should have this Items property:

Filter( Contacts,
Radio1.Selected.Value = "All"
Or (Radio1.Selected.Value = "Accounts" And 'Company Name' = ComboBox1.Selected)
Or (Radio1.Selected.Value = "Contacts" And 'Company Name' = ComboBox1_1.Selected)
)
Two important differences between Customer and Owner require an update to the formulas inside the gallery
and the form:
1. One-to-many relationships between Accounts and Contacts take precedence when you refer to these
entity types by name. Instead of Accounts, use [@Accounts]; instead of Contacts, use [@Contacts]. By
using the global disambiguation operator, you ensure that you're referring to the entity type in IsType and
AsType. This problem exists only in the record context of the gallery and form controls.
2. The Owner field must have a value, but Customer fields can be blank. To show the correct result without a
type name, test for this case with the IsBlank function, and show an empty text string instead.
Both of these changes are in the same formula, which appears in the custom card in the form, as well as in the
Text property of the gallery's label control:

If( IsBlank( ThisItem.'Company Name' ), "",


IsType( ThisItem.'Company Name', [@Accounts] ),
"Account: " & AsType( ThisItem.'Company Name', [@Accounts] ).'Account Name',
"Contact: " & AsType( ThisItem.'Company Name', [@Contacts] ).'Full Name'
)

With these changes, you can view and change the Company Name field in the Contacts entity.
NOTE
As of this writing, Customer lookups have these limitations:
You can't filter a list based on a specific record in the Contacts or Accounts entities. The filter radio-button control in the
previous example won't work.
The only customer field that's working is the system-defined 'Company Name' on the Contacts entity, which was used
in the previous example. Adding a custom customer field isn't yet supported.
You can't clear the customer field by using Patch to set it to blank.

Understand Regarding lookup fields


The Regarding lookup field differs a little from those that you've already worked with in this topic. You'll start by
applying the patterns that this topic described earlier, and then you'll learn other tricks.
You can start simply with the Faxes entity. This entity has a polymorphic Regarding lookup field, which can refer
to Accounts, Contacts, and other entities. You can take the app for Customers and modify it for Faxes.

LOCATION CUSTOMER SAMPLE FAXES SAMPLE

Throughout 'Customer Name' Regarding

Gallery's Items property Contacts Faxes

Form's Items property Contacts Faxes

The first argument of Patch Contacts Faxes


in the button's OnSelect property

Again, you'll need to add a data source: this time for Faxes. On the View tab, select Data sources:
An important difference for Regarding is that it isn't limited to Accounts and Contacts. In fact, the list of entities
is extensible with custom entities. Most of the app can accommodate this point without modification, but you must
update the formula for the label in the gallery and the form:

If( IsBlank( ThisItem.Regarding ), "",


IsType( ThisItem.Regarding, [@Accounts] ),
"Account: " & AsType( ThisItem.Regarding, [@Accounts] ).'Account Name',
IsType( ThisItem.Regarding, [@Contacts] ),
"Contacts: " & AsType( ThisItem.Regarding, [@Contacts] ).'Full Name',
""
)

After you make these changes, you work with the Regarding lookup just as you did the Owner and Customer
lookups.
NOTE
As of this writing, Regarding lookups have these limitations:
You can't filter a list based on a specific record. The filter radio-button control in the previous example won't work.
You can't clear the regarding field by using Patch to set it to blank.

Understand Regarding relationships


Regarding differs from Owner and Customer because the former involves a many-to-one relationship. By
definition, a reverse, one-to-many relationship allows you to write First( Accounts ).Faxes.
Let's back up and look at the entity definitions. In Common Data Service, entities such as Faxes, Tasks, Emails,
Notes, Phone Calls, Letters, and Chats are designated as activities. You can also create your own custom activity
entities. When you view or create an activity entity, its settings appear under More settings.

Other entities can be related to an activity entity if they're enabled as an activity task in the entity's settings.
Accounts, Contacts, and many other standard entities are so designated (again, under More settings).
All activity entities and activity-task entities have an implied relationship. If you change the filter to All at the top of
the screen, select the Faxes entity, and then select the Relationships tab, all entities that can be a target of a
Regarding lookup appear.

If you show the relationships for the Accounts entity, all the entities that can be a source of a Regarding lookup
field appear.

What does it all mean?


When you write formulas, you must consider that the list of activity entities isn't fixed, and you can create your
own. The formula must appropriately handle an activity entity that you didn't expect.
Activity tasks and activities have a one-to-many relationship. You can easily ask for all faxes that relate to an
account.
To explore this concept in the app:
1. Add another screen.

2. Insert a gallery control, resize it, and then move it to the left side of the screen.
3. On the Properties tab near the right side of the screen, set the gallery's Items to Accounts.

4. Set the gallery's layout to Title, and then set the title field to Account Name.
5. Add a second gallery, resize it, and then move it to the right side of the screen.
6. Set the new gallery's Items property to Gallery2.Selected.Faxes .
This step returns the filtered list of faxes for a given account.

7. Set the gallery's layout to Title and subtitle, and then set the title field to show the Subject field (which
might be lowercase subject).

As you select an item in the list of accounts, the list of faxes shows faxes for only that account.
Activity entity
As the previous section describes, you can show all the faxes for an account. However, you can also show all the
activities for an account, including faxes, email messages, phone calls, and other interactions.
For the latter scenario, you use the Activity entity. You can show this entity by turning on All in the upper-right
corner to remove the filter from the list of entities.

The Activity entity is special. Whenever you add a record to the Faxes entity, the system also creates a record in
the Activity entity with the fields that are common across all activity entities. Of those fields, Subject is one of the
most interesting.
You can show all activities by changing only one line in the previous example. Replace Gallery2.Selected.Faxes
with Gallery2.Selected.Activities .
Records are coming from the Activity entity, but you can nevertheless use the IsType function to identify which
kind of activity they are. Again, before you use IsType with an entity type, you must add the data source.
By using this formula, you can show the record type in a label control within the gallery:

If( IsType( ThisItem, [@Faxes] ), "Fax",


IsType( ThisItem, [@'Phone Calls'] ), "Phone Call",
IsType( ThisItem, [@'Email Messages'] ), "Email Message",
IsType( ThisItem, [@Chats] ), "Chat",
"Unknown"
)

You can also use AsType to access the fields of the specific type. For example, this formula determines the type of
each activity and, for phone calls, shows the phone number and call direction from the Phone Numbers entity:

If( IsType( ThisItem, [@Faxes] ), "Fax",


IsType( ThisItem, [@'Phone Calls'] ),
"Phone Call: " &
AsType( ThisItem, [@'Phone Calls'] ).'Phone Number' &
" (" & AsType( ThisItem, [@'Phone Calls'] ).Direction & ")",
IsType( ThisItem, [@'Email Messages'] ), "Email Message",
IsType( ThisItem, [@Chats] ), "Chat",
"Unknown"
)
As a result, the app shows a complete list of activities. The Subject field appears for all types of activities, whether
the formula takes them into account or not. For types of activities that you know about, you can show their type
names and type-specific information about each activity.

Notes entity
So far, all of the Regarding examples have been based on activities, but the Notes entity represents another case.
When you create an entity, you can enable attachments.
If you select the check box for enabling attachments, you'll create a Regarding relationship with the Notes entity,
as this graphic shows for the Accounts entity:

Other than this difference, you use the Regarding lookup in the same manner in which you use activities. Entities
that are enabled for attachments have a one-to-many relationship to Notes, as in this example:
First( Accounts ).Notes

NOTE
As of this writing, the Regarding lookup isn't available for the Notes entity. You can't read or filter based on the Regarding
field, and you can't set the field by using Patch.
However, the reverse Notes one-to-many relationship is available, so you can filter a list of notes for a record that's enabled
for attachments. You can also use the Relate function to add a note to a record's Notes table, but the note must be created
first, as in this example:
Relate( ThisItem.Notes, Patch( Notes, Defaults( Notes ), { Title: "A new note" } ) )

Activity parties
As of this writing, canvas apps don't support activity parties.
Add and configure a canvas-app control in
PowerApps
4/25/2019 • 5 minutes to read • Edit Online

Add a variety of UI elements to your canvas app, and configure aspects of their appearance and behavior
directly, from the toolbar, in the Properties tab, or in the formula bar. These UI elements are called controls,
and the aspects that you configure are called properties.

Prerequisites
1. If you don't already have a PowerApps license, sign up, and then sign in.
2. Under Make your own app, hover over Canvas app from blank, and then select Make this app.
3. If you're prompted to take the intro tour, selectNext to get familiar with key areas of the PowerApps
interface (or select Skip).
You can always take the tour later by selecting the question-mark icon near the upper-right corner of
your screen and then selecting Take the intro tour.

Add and select a control


On the Insert tab, perform either of these steps:
Select Label or Button to add one of those types of controls.
Select a category of controls, and then select the type of control that you want to add.
For example, select New screen, and then select Blank to add a blank screen to your app. (Screens are a
type of control that can contain other types of controls.)

The new screen is named Screen2 and appears in the left navigation pane. This pane shows a hierarchical
list of controls in your app so that you can easily find and select each control.

To demonstrate how this list works, select Label on the Insert tab. The new control appears under Screen2
in the hierarchical list.
In the screen, a box with six handles surrounds the label by default. That type of box surrounds whichever
control is selected. If you select the screen by clicking or tapping in it (but outside the label), the box
disappears from the label. To select the label again, you can click or tap in it, or you can click or tap its name
in the hierarchical list of controls.

IMPORTANT
You must always select a control before you can configure it.

Rename a control
In the hierarchical list of controls, hover over the control that you want to rename, select the ellipsis button
that appears, and then select Rename. You can then type a unique, memorable name to make building your
app easier.

Delete a control
In the hierarchical list of controls, hover over the control that you want to delete, select the ellipsis button
that appears, and then select Delete. To delete a control that isn't a screen, you can also select the control on
the canvas, and then press the Delete key.
Reorder screens
In the hierarchical list of controls, hover over a screen that you want to move up or down, select the ellipsis
button that appears, and then select Move up or Move down.

NOTE
When the app is opened, the screen at the top of the hierarchical list of controls usually appears first. But you can
specify a different screen by setting the OnStart property to a formula that includes the Navigate function.

Move and resize a control


To move a control, select it, hover over its center so that the four-headed arrow appears, and then drag the
control to a different location.

To resize a control, select it, hover over any handle in the selection box so that the two-headed arrow
appears, and then drag the handle.
NOTE
As this topic describes later, you can also move and resize a control by modifying any combination of its X, Y, Height,
and Width properties in the formula bar.

Change the text of a label or a button


Select a label or button, double-click the text that appears in the control, and then type the text that you
want.

NOTE
As this topic describes later, you can also change this text by modifying its Text property in the formula bar.

Configure a control from the toolbar


By configuring a control from the toolbar, you can specify a wider variety of options than you can by
configuring a control directly.
For example, you can select a label, select the Home tab, and then change the font of the text in the label.

Configure a control from the Properties tab


By using the Properties tab, you can specify a wider variety of options than you can by configuring a
control from the toolbar.
For example, you can select a control and then show or hide it by changing its Visible property.
Configure a control in the formula bar
Instead of configuring a control directly, from the toolbar, or in the Properties tab, you can configure a
control by selecting a property in the property list and then specifying a value in the formula bar. By taking
this approach, you can search for a property alphabetically, and you can specify more types of values.
For example, you can select a label and then configure it in these ways:
Move it by selecting X or Y in the properties list and then specifying a different number in the
formula bar.

Resize it by selecting Height or Width in the properties list and then specifying a different number
in the formula bar.

Change its text by selecting Text in the properties list and then specifying any combination of a literal
string, an expression, or a formula in the formula bar.
A literal string is surrounded by quotation marks and appears exactly as you type it. "Hello,
world" is a literal string.
An expression doesn't include a function and is often based on a property of another control.
Screen1.Height is an expression that shows the height of Screen1.

A formula includes one or more functions. The Now function returns the current date and
time in your local time zone, and the Text function formats values such as dates, times, and
currency.

Formulas are usually much more complex than this example so that they can update data, sort
it, filter it, and perform other operations. For more information, see the formula reference.

Next steps
Find step-by-step procedures for configuring common controls such as screens, lists, galleries, forms,
and charts.
Find reference information about each type of control in the control reference.
Add a screen to a canvas app and navigate between
screens
2/4/2019 • 2 minutes to read • Edit Online

Create a canvas app with multiple screens, and add ways for users to navigate between them.

Add and rename a screen


1. On the Home tab, select New screen, and then select the type of screen that you want to add.

2. In the right-hand pane, select the name of the screen (just above the Properties tab), and then type
Source.

3. Add another screen, and name it Target.

Reorder screens
In the left navigation bar, hover over a screen that you want to move up or down, select the ellipsis button that
appears, and then select Move up or Move down.
NOTE
When the app is opened, the screen at the top of the hierarchical list of controls usually appears first. But you can specify a
different screen by setting the OnStart property to a formula that includes the Navigate function.

Add navigation
1. With the Source screen selected, open the Insert tab, select Icons, and then select Next arrow.

2. (optional) Move the arrow so that it appears in the lower-right corner of the screen.
3. With the arrow still selected, select the Action tab, and then select Navigate.
The OnSelect property for the arrow is automatically set to a Navigate function.

When a user selects the arrow, the Target screen fades in.
4. On the Target screen, add a Back arrow, and set its OnSelect property to this formula:
Navigate(Source, ScreenTransition.Fade)

5. While holding down the Alt key, toggle between screens by selecting the arrow on each screen.

More information
Screen-control reference
Add a scrolling screen to a canvas app in PowerApps
12/18/2018 • 2 minutes to read • Edit Online

In a canvas app, create a screen that users can scroll to show different items. For example, create a phone app that
shows data in several charts, which users can display if they scroll.
When you add multiple controls in a section, the controls maintain their relative positions within that section,
regardless if it's a phone app or a tablet app. Note that the screen size and orientation may determine how the
sections are arranged.

Prerequisites
1. Sign up for PowerApps.
2. Sign in using the same credentials that you used to sign up.
3. Under Make your own app, hover over the Canvas app from blank tile, select the phone icon, and then
select Make this app.
4. Learn how to add and configure controls.

Create a scrolling screen


1. On the Home tab, click or tap New screen:

2. On the Home tab, click or tap Layouts, and then click or tap the option to add an infinite scrolling canvas:

The canvas is added:


Add elements
Now, let's add some controls to the canvas to see how the scrolling screen works.
1. In the canvas you added, click or tap Add an item from the Insert tab.

2. On the Insert tab, click or tap Charts, and then click or tap Column Chart.
A column chart appears in the first card on the screen:

3. On the Insert tab, click or tap Text, and then click or tap Pen input:

4. Move the pen control below the chart, and resize the pen control to cover the bottom of the card:

Add a section
Now, let's add another card with another control.
1. Near the bottom of the screen, click or tap Add section:

A new card is added to the screen:

2. With the card still selected, go to the Insert tab, click or tap Charts, and then click or tap Line chart.
The new chart is too big to appear on the screen with the other controls:

3. Open Preview mode by pressing F5 (or by clicking or tapping the play icon near the upper-right corner).

4. Scroll down to display the new line chart.


Overview of the calendar-screen template for canvas
apps
1/23/2019 • 10 minutes to read • Edit Online

In a canvas app, add a calendar screen that shows users upcoming events from their Office 365 Outlook accounts.
Users can select a date from a calendar and scroll through a list of that day's events. You can change which details
appear in the list, add a second screen that shows more details about each event, show a list of attendees for each
event, and make other customizations.
You can also add other template-based screens that show different data from Office 365, such as email, people in
an organization, and availability of people users might want to invite to a meeting.
This overview teaches you:
How to use the default calendar screen.
How to modify it.
How to integrate it into an app.
For a deeper dive into this screen's default functionality, see the calendar-screen reference.

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Default functionality
To add a calendar screen from the template:
1. Sign in to PowerApps, and then create an app or open an existing app in PowerApps Studio.
This topic shows a phone app, but the same concepts apply to a tablet app.
2. On the Home tab of the ribbon, select New screen > Calendar.
By default, the screen looks similar to this:

3. To show data, select an option in the drop-down list near the top of the screen.
A few helpful notes:
Today's date is selected by default, and you can easily return to it by selecting the calendar icon in the upper-
right corner.
If you select a different date, a circle surrounds it, and a light-colored rectangle (blue if the default theme is
applied) surrounds today's date.
If at least one event is scheduled for a particular date, a small colored circle appears under that date in the
calendar.
If you select a date for which one or more events are scheduled, the event(s) appear in a list under the calendar.

Modify the screen


You can modify the default functionality of this screen in a few common ways:
Specify the calendar.
Show different details about an event.
Hide nonblocking events.
If you want to modify the screen further, use the calendar-screen reference as a guide.
Specify the calendar
If you already know which calendar your users should view, you can simplify the screen by specifying that calendar
before you publish the app. This change removes the need for the drop-down list of calendars, so you can remove
it.
1. Set the OnStart property of the default screen in the app to this formula:
Set( _userDomain, Right( User().Email, Len( User().Email ) - Find( "@", User().Email ) ) );
Set( _dateSelected, Today() );
Set( _firstDayOfMonth, DateAdd( Today(), 1 - Day( Today() ), Days ) );
Set( _firstDayInView,
DateAdd( _firstDayOfMonth, -( Weekday( _firstDayOfMonth) - 2 + 1 ), Days )
);
Set( _lastDayOfMonth, DateAdd( DateAdd( _firstDayOfMonth, 1, Months ), -1, Days ) );
Set( _calendarVisible, false );
Set( _myCalendar,
LookUp( Office365.CalendarGetTables().value, DisplayName = "{YourCalendarNameHere}" )
);
Set( _minDate,
DateAdd( _firstDayOfMonth, -( Weekday(_firstDayOfMonth) - 2 + 1 ), Days )
);
Set( _maxDate,
DateAdd(
DateAdd( _firstDayOfMonth, -( Weekday(_firstDayOfMonth) - 2 + 1 ), Days ),
40,
Days
)
);
ClearCollect( MyCalendarEvents,
Office365.GetEventsCalendarViewV2( _myCalendar.Name,
Text( _minDate, UTC ),
Text( _maxDate, UTC )
).value
);
Set( _calendarVisible, true )

NOTE
This formula is slightly edited from the default value of the OnSelect property of the drop-down list for selecting a
calendar. For more information about that control, see its section in the calendar-screen reference.

2. Replace {YourCalendarNameHere} , including the curly braces, with the name of the calendar that you want to
show (for example, Calendar).

IMPORTANT
The following steps assume that you've added only one calendar screen to the app. If you've added more than one,
control names (such as iconCalendar1) will end with a different number, and you'll need to adjust the formulas
accordingly.

3. Set the Y property of the iconCalendar1 control to this expression:


RectQuickActionBar1.Height + 20

4. Set the Y property of the LblMonthSelected1 control to this expression:


iconCalendar1.Y + iconCalendar1.Height + 20

5. Set the Text property of the LblNoEvents1 control to this value:


"No events scheduled"

6. Set the Visible property of LblNoEvents1 to this formula:


CountRows(CalendarEventsGallery1.AllItems) = 0 && _calendarVisible

7. Delete these controls:


dropdownCalendarSelection1
LblEmptyState1
iconEmptyState1
8. If the calendar screen isn't the default screen, add a button that navigates from the default screen to the
calendar screen so that you can test the app.
For example, add a button on Screen1 that navigates to Screen2 if you added a calendar screen to an app
that you created from blank.
9. Save the app, and then test it in a browser or on a mobile device.
Show different details about an event
By default, the gallery under the calendar, named CalendarEventsGallery, shows the start time, the duration, the
subject, and the location of each event. You can configure the gallery to show any field (such as the organizer) that
the Office 365 connector supports.
1. In CalendarEventsGallery, set the Text property of a new or an existing label to ThisItem followed by a
period.
IntelliSense lists the fields that you can select.
2. Select the field that you want.
The label shows the type of information that you specified.
Hide nonblocking events
In many offices, team members send meeting requests to notify each other when they'll be away from the office.
To avoid blocking everyone's schedules, the person sending the request sets its availability to Free. You can hide
these events from the calendar and the gallery by updating a couple of properties.
1. Set the Items property of CalendarEventsGallery to this formula:

SortByColumns(
Filter(
MyCalendarEvents,
Text( Start, DateTimeFormat.ShortDate ) =
Text( _dateSelected, DateTimeFormat.ShortDate ),
ShowAs <> "Free"
),
"Start"
)

In this formula, the Filter function hides not only those events that are scheduled for a date other than the
one selected but also events for which the availability is set to Free.
2. In the calendar, set the Visible property of the Circle control to this formula:

CountRows(
Filter(
MyCalendarEvents,
DateValue( Text(Start) ) = DateAdd( _firstDayInView, ThisItem.Value, Days ),
ShowAs <> "Free"
)
) > 0 && !Subcircle1.Visible && Title2.Visible

This formula contains the same filters as the previous formula. Therefore, the event-indicator circle appears
under a date only if it has one or more events that are on the selected date and for which the availability
isn't set to Free.
Integrate the screen into an app
The calendar screen is a powerful bundle of controls in its own right, but it usually performs best as part of a
larger, more versatile app. You can integrate this screen into a larger app in a number of ways, including adding
these options:
View event details.
Show event attendees.
View event details
If users select an event in CalendarEventsGallery, you can open another screen that shows more information
about that event.

NOTE
This procedure shows event details in a gallery with dynamic content, but you can achieve similar results by taking other
approaches. For example, you can get more design control by using a series of labels instead.

1. Add a blank screen, named EventDetailsScreen, that contains a blank flexible-height gallery and a button
that navigates back to the calendar screen.
2. In the flexible-height gallery, add a Label control and an HTML text control, and set the AutoHeight
property of both to true.

NOTE
PowerApps retrieves the message body of each event as HTML text, so you need to show that content in an HTML
text control.

3. Set the Y property of the HTML text control to this expression:


Label1.Y + Label1.Height + 20

4. Adjust additional properties as necessary to suit your style needs.


For example, you might want to add a separator line below the HTML text control.
5. Set the Items property of the flexible-height gallery to this formula:

Table(
{ Title: "Subject", Value: _selectedCalendarEvent.Subject },
{
Title: "Time",
Value: _selectedCalendarEvent.Start & " - " & _selectedCalendarEvent.End
},
{ Title: "Body", Value: _selectedCalendarEvent.Body }
)

This formula creates a gallery of dynamic data that's set to the field values of _selectedCalendarEvent,
which is set every time the user selects an event in the CalendarEventsGallery control. You can extend
this gallery to include more fields by adding more labels to it, but this set provides a good starting point.
6. With the gallery items in place, set the Text property of the Label control to ThisItem.Title , and the
HtmlText property of the HTML text control to ThisItem.Value .
7. In CalendarEventsGallery, set the OnSelect property of the Title control to this formula:
Set( _selectedCalendarEvent, ThisItem );
Navigate( EventDetailsScreen, None )

NOTE
Instead of using the _selectedCalendarEvent variable, you could instead use CalendarEventsGallery.Selected.

Show event attendees


The Office365.GetEventsCalendarViewV2 operation retrieves a variety of fields for each event, including a
semicolon-separated set of required and optional attendees. In this procedure, you'll parse each set of attendees,
determine which attendees are in your organization, and retrieve the Office 365 profiles of any who are.
1. If your app doesn't contain the Office 365 Users connector,add it.
2. To retrieve the Office 365 profiles of the meeting attendees, set the OnSelect property of the Title control
in the CalendarEventsGallery to this formula:

Set( _selectedCalendarEvent, ThisItem );


ClearCollect( AttendeeEmailsTemp,
Filter(
Split( ThisItem.RequiredAttendees & ThisItem.OptionalAttendees, ";" ),
!IsBlank( Result )
)
);
ClearCollect( AttendeeEmails,
AddColumns( AttendeeEmailsTemp,
"InOrg",
Upper( _userDomain ) = Upper( Right( Result, Len( Result ) - Find( "@", Result ) ) )
)
);
ClearCollect( MyPeople,
ForAll( AttendeeEmails, If( InOrg, Office365Users.UserProfile( Result ) ) )
);
Collect( MyPeople,
ForAll( AttendeeEmails,
If( !InOrg,
{ DisplayName: Result, Id: "", JobTitle: "", UserPrincipalName: Result }
)
)
)

This list discusses what each ClearCollect operation does:


ClearCollect(AttendeeEmailsTemp)

ClearCollect( AttendeeEmailsTemp,
Filter(
Split( ThisItem.RequiredAttendees & ThisItem.OptionalAttendees, ";" ),
!IsBlank( Result)
)
);

This formula concatenates the required and optional attendees into a single string and then splits that string
into individual addresses at each semicolon. The formula then filters out blank values from that set and
adds the other values into a collection named AttendeeEmailsTemp.
ClearCollect(AttendeeEmails)
ClearCollect( AttendeeEmails,
AddColumns( AttendeeEmailsTemp,
"InOrg",
Upper( _userDomain ) = Upper( Right( Result, Len(Result) - Find("@", Result) ) )
)
);

This formula roughly determines whether an attendee is in your organization. The definition of
_userDomain is simply the domain URL in the email address of the person who's running the app. This
line creates an additional true/false column, named InOrg, in the AttendeeEmailsTemp collection. This
column contains true if userDomain is equivalent to the domain URL of the email address in that
particular row of AttendeeEmailsTemp.
This approach isn't always accurate, but it gets pretty close. For example, certain attendees in your org
might have an email address like [email protected], whereas _userDomain is Contoso.com. The app
user and Jane might work at the same company but have slight variations in their email addresses. For
cases such as these, you might want to use this formula:
Upper(_userDomain) in Upper(Right(Result, Len(Result) - Find("@", Result)))

However, this formula matches email addresses like [email protected] with a


_userDomain like Contoso.com, and those people don't work at the same company.
ClearCollect(MyPeople)

ClearCollect( MyPeople,
ForAll( AttendeeEmails,
If( InOrg,
Office365Users.UserProfile( Result )
)
)
);
Collect( MyPeople,
ForAll( AttendeeEmails,
If( !InOrg,
{
DisplayName: Result,
Id: "",
JobTitle: "",
UserPrincipalName: Result
}
)
)
);

To retrieve Office 365 profiles, you must use the Office365Users.UserProfile or


Office365Users.UserProfileV2 operation. These operations first gather all the Office 365 profiles for
attendees who are in the user's org. Then the operations add a few fields for attendees from outside the
organization. You separated these two items into distinct operations because the ForAll loop doesn't
guarantee order. Therefore, ForAll might collect an attendee from outside the organization first. In this case,
the schema for MyPeople contains only DisplayName, Id, JobTitle, and UserPrincipalName. However,
the UserProfile operations retrieve much richer data than that. So you force the MyPeople collection to
add Office 365 profiles before the other profiles.

NOTE
You can achieve the same result with only one ClearCollect function:
ClearCollect( MyPeople,
ForAll(
AddColumns(
Filter(
Split(
ThisItem.RequiredAttendees & ThisItem.OptionalAttendees,
";"
),
!IsBlank( Result )
),
"InOrg", _userDomain = Right( Result, Len( Result ) - Find( "@", Result ) )
),
If( InOrg,
Office365Users.UserProfile( Result ),
{
DisplayName: Result,
Id: "",
JobTitle: "",
UserPrincipalName: Result,
Department: "",
OfficeLocation: "",
TelephoneNumber: ""
}
)
)
)

To finish this exercise:


1. Add a screen that contains a gallery for which the Items property is set to MyPeople.
2. In the OnSelect property of the Title control in the CalendarEventsGallery, add a Navigate function to
the screen that you created in the previous step.

Next steps
View the reference documentation for this screen.
Learn more about the Office 365 Outlook connector.
Learn more about the Office 365 Users connector.
Reference information about the calendar-screen
template for canvas apps
4/1/2019 • 12 minutes to read • Edit Online

For canvas apps in PowerApps, understand how each significant control in the calendar-screen template
contributes to the screen's overall default functionality. This deep dive presents the behavior formulas and the
values of other properties that determine how the controls respond to user input. For a high-level discussion of
this screen's default functionality, see the calendar-screen overview.
This topic highlights some significant controls and explains the expressions or formulas to which various
properties (such as Items and OnSelect) of these controls are set:
Calendar drop-down (dropdownCalendarSelection)
Calendar icon (iconCalendar)
Previous-month chevron (iconPrevMonth)
Next-month chevron (iconNextMonth)
Calendar gallery (MonthDayGallery) (+ child controls)
Events gallery (CalendarEventsGallery)

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Calendar drop-down

Property: Items
Value: Office365.CalendarGetTables().value
This value is a connector operation that retrieves the app user's Outlook calendars. You can see the value
that this operation retrieves.
Property: OnChange
Value: Select(dropdownCalendarSelection)
When the user selects an option in the list, the function in the control's OnSelect property runs.
Property: OnSelect
Value: An If function, which appears in the following code block, and several additional functions, which
appear in the code block after that.
This part of the formula runs only the first time that the user selects an option in the drop-down list after
opening the app:
If( IsBlank( _userDomain ),
UpdateContext( {_showLoading: true} );
Set( _userDomain, Right( User().Email, Len( User().Email ) - Find( "@", User().Email ) ) );
Set( _dateSelected, Today() );
Set( _firstDayOfMonth, DateAdd( Today(), 1 - Day( Today() ), Days ) );
Set( _firstDayInView, DateAdd( _firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 1), Days ) );
Set( _lastDayOfMonth, DateAdd( DateAdd( _firstDayOfMonth, 1, Months ), -1, Days ) )
);

The preceding code defines the following variables:


_userDomain: The app user's company domain, as reflected in the user's email address.
_dateSelected: Today's date (by default). The calendar gallery highlights this date, and the event gallery
shows the events that are scheduled for that date.
_firstDayOfMonth: The first day of the current month. Because
(Today + (1 - Today)) = Today - Today + 1 = 1 , this DateAdd function always returns the first day of
the month.
_firstDayInView: The first day that the calendar gallery can show. This value isn't the same as the first
day of the month unless the month starts on a Sunday. To prevent showing an entire week of the
previous month, the value of _firstDayInView is _firstDayOfMonth - Weekday(_firstDayOfMonth) + 1 .
_lastDayOfMonth: The last day of the current month, which is the same as the first day of next month,
minus one day.
The functions after the If function run whenever the user selects an option in the calendar drop-down list
(not just the first time the user opens the app):

Set( _calendarVisible, false );


UpdateContext( {_showLoading: true} );
Set( _myCalendar, dropdownCalendarSelection2.Selected );
Set( _minDate,
DateAdd( _firstDayOfMonth, -(Weekday( _firstDayOfMonth ) - 2 + 1), Days )
);
Set(_maxDate,
DateAdd(
DateAdd( _firstDayOfMonth, -(Weekday( _firstDayOfMonth ) - 2 + 1), Days ),
40,
Days
)
);
ClearCollect( MyCalendarEvents,
'Office365'.GetEventsCalendarViewV2( _myCalendar.Name,
Text( _minDate, UTC ),
Text( _maxDate, UTC )
).value
);
UpdateContext( {_showLoading: false} );
Set( _calendarVisible, true )

The preceding code defines these variables and one collection:


_calendarVisible: Set to false so that the calendar doesn't appear while the new selection is loaded.
_showLoading: Set to true so that loading indicators appear while the new selection is being loaded.
_myCalendar: Set to the current value of the calendar drop-down control so that events from the
correct calendar are retrieved.
_minDate: Set to the same value as _firstDayInView. This variable determines what events have
already been retrieved from Outlook and cached in the app.
_maxDate: Set to the last viewable day in the calendar. The formula is _firstDayInView + 40 . The
calendar displays a maximum of 41 days, so the _maxDate variable always reflects the last viewable
day, and determines what events have already been retrieved from Outlook and cached in the app.
MyCalendarEvents: Set to a collection of the user's events from the selected calendar, ranging from
_minDate to _maxDate.
_showLoading: Set to false; _calendarVisible is set to true after everything else has been loaded.

Calendar icon

Property: OnSelect
Value: Four Set functions that reset the calendar gallery to today's date:

Set( _dateSelected, Today() );


Set( _firstDayOfMonth, DateAdd( Today(), 1 - Day( Today() ), Days) );
Set( _firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday( _firstDayOfMonth ) - 2 + 1), Days));
Set( _lastDayOfMonth, DateAdd( DateAdd( _firstDayOfMonth, 1, Months ), -1, Days ) )

The preceding code resets all date variables that are necessary for displaying the proper calendar view:
_dateSelected is reset to today.
_firstDayOfMonth is reset to the first day of today's month.
_firstDayInView is reset to the first day viewable when today's month is selected.
_lastDayOfMonth is reset to the last day of today's month.
The Calendar drop-down section of this topic explains these variables in more detail.

Previous-month chevron

Property: OnSelect
Value: Four Set functions and an If function that show the previous month in the calendar gallery:

Set( _firstDayOfMonth, DateAdd( _firstDayOfMonth, -1, Months ) );


Set( _firstDayInView,
DateAdd( _firstDayOfMonth, -(Weekday( _firstDayOfMonth ) - 2 + 1), Days )
);
Set( _lastDayOfMonth, DateAdd(DateAdd( _firstDayOfMonth, 1, Months ), -1, Days ) );
If( _minDate > _firstDayOfMonth,
Collect( MyCalendarEvents,
'Office365'.GetEventsCalendarViewV2( _myCalendar.Name,
Text( _firstDayInView, UTC ),
Text( DateAdd( _minDate, -1, Days ), UTC )
).value
);
Set( _minDate, _firstDayInView )
)
NOTE
Definitions for _firstDayOfMonth, _firstDayInView, and _lastDayOfMonth are nearly identical to those in the
Calendar drop-down section of this topic.

The first three lines of the preceding code run whenever the user selects the previous-month chevron. The
code sets the variables that are necessary to display the proper calendar view. The remaining code runs
only if the user hasn't previously selected this month for the selected calendar.
If this is the case, _minDate is the first day that appears when the previous month displays. Before the user
selects the icon, _minDate has a minimum possible value of the 23rd of the current month. (When March
1 falls on a Saturday, _firstDayInView for March is February 23.) That means that if a user hasn't selected
this month yet, _minDate is greater than the new _firstDayOfMonth, and the If function returns true.
The code runs, and a collection and a variable are updated:
MyCalendarEvents retrieves events from the selected calendar with the
Office365.GetEventsCalendarViewV2 operation. The date range is between the _firstDayInView
date and _minDate - 1. Because MyCalendarEvents already contains events on the _minDate
date, 1 is subtracted from that date for the maximum value in this new date range.
_minDate is set to the current _firstDayInView because this is the first date for which events have
been retrieved. If a user returns to this date by selecting the previous-month chevron, the If function
returns false; the code doesn't run because events for this view are already cached in
MyCalendarEvents.

Next-month chevron

Property: OnSelect
Value: Four Set functions and an If function that show the next month in the calendar gallery:

Set( _firstDayOfMonth, DateAdd( _firstDayOfMonth, 1, Months ) );


Set( _firstDayInView,
DateAdd( _firstDayOfMonth, -(Weekday( _firstDayOfMonth ) - 2 + 1), Days ) );
Set( _lastDayOfMonth, DateAdd( DateAdd( _firstDayOfMonth, 1, Months ), -1, Days ) );
If( _maxDate < _lastDayOfMonth,
Collect( MyCalendarEvents,
'Office365'.GetEventsCalendarViewV2( _myCalendar.Name,
Text( DateAdd( _maxDate, 1, Days ), UTC ),
DateAdd( _firstDayInView, 40, Days )
).value
);
Set( _maxDate, DateAdd( _firstDayInView, 40, Days) )
)

NOTE
Definitions for _firstDayOfMonth, _firstDayInView, and _lastDayOfMonth are nearly identical to those in the
Calendar drop-down section of this topic.
The first three lines of the preceding code, which run when the user selects the next-month chevron, set the
variables that are necessary to display the proper calendar view. The remaining code runs only if the user
hasn't previously selected this month for the selected calendar.
In that case, _maxDate is the last day that appears when the previous month displays. Before the user
selects the next-month chevron, _maxDate has a maximum possible value of the 13th of the next month.
(When February 1 falls on a non-leap year Sunday, _maxDate is March 13, which is _firstDayInView +
40 days.) That means that if a user hasn't selected this month yet, _maxDate is greater than the new
_lastDayOfMonth, and the If function returns true. The code runs, and a collection and a variable are
updated:
MyCalendarEvents retrieves events from the selected calendar with the
Office365.GetEventsCalendarViewV2 operation. The date range is between _maxDate + 1 day and
_firstDayInView + 40 days. Because MyCalendarEvents already contains events on the
_minDate date, 1 is added to that date for the minimum value in this new date range.
_firstDayInView + 40 is the formula for _maxDate, so the second date in the range is just the new
_maxDate.
_maxDate is set to _firstDayInView + 40 days because this is the last day for which events have
been retrieved. If a user returns to this date by selecting the next-month chevron, the If function
returns false; the code doesn't run because events for this view are already cached in
MyCalendarEvents.

Calendar gallery

Property: Items
Value:
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]

The set of 0 through 41 is used for the items in the calendar gallery because, in the worst-case scenario, the
calendar view will have to display 42 full days. This occurs when the first of the month occurs on a Saturday
and the last of the month occurs on a Sunday. In this case, the calendar shows six days from the previous
month in the row containing the first of the month, and six days from the following month in the row
containing the last of the month. This is 42 unique values, of which 30 are for the selected month.
Property: WrapCount
Value: 7
This value reflects a seven-day week.
Title control in the calendar gallery
Property: Text
Value: Day( DateAdd( _firstDayInView, ThisItem.Value, Days ) )

Recall that _firstDayInView is defined as (_firstDayOfMonth - its weekday value) + 1. This tells you that
_firstDayInView is always a Sunday, and _firstDayOfMonth is always in the first row of
MonthDayGallery. Because of these two facts, _firstDayInView is always in the very first cell of
MonthDayGallery. ThisItem.Value is the number for that cell in the MonthDayGallery item property.
So, taking _firstDayInView as a starting point, each cell displays the increment of _firstDayInView + its
respective cell value.
Property: Fill
Value: One If function:

If( DateAdd( _firstDayInView, ThisItem.Value ) = Today() &&


DateAdd( _firstDayInView, ThisItem.Value ) = _dateSelected,
RGBA( 0, 0, 0, 0 ),
DateAdd( _firstDayInView, ThisItem.Value) = Today(),
ColorFade( Subcircle.Fill, 0.67 ),
Abs( Title.Text - ThisItem.Value) > 10,
RGBA( 200, 200, 200, 0.3 ),
RGBA( 0, 0, 0, 0 )
)

As discussed in the description of the Text property, DateAdd(_firstDayInView, ThisItem.Value) represents


the day in the visible cell. Taking this into account, the preceding code performs these comparisons:
1. If the cell’s value is today’s date AND this cell is equivalent to _dateSelected, don't provide a fill
value.
2. If the cell’s value is today’s date but not equivalent to _dateSelected, provide the ColorFade fill.
3. The last comparison isn't as clear. It's a comparison between the actual text value in the cell and the
value of the cell item (the number on display and the item number).
To better understand this, consider September 2018, a month that starts on a Saturday and ends on
a Sunday. In this case, the calendar displays the 26th through 31st of August and the 1st of
September in the first row, and Abs(Title.Text - ThisItem.Value) = 26 until September 1st. Then
Abs(Title.Text - ThisItem.Value) = 5 . It will stay at 5 until the last row in the calendar, which
displays September 30th and October 1st through 6th. In that Abs(Title.Text - ThisItem.Value) will
still be 5 for September 30th, but will be 35 for the October dates.
This is the pattern: For days displayed from the previous month, Abs(Title.Text - ThisItem.Value)
will always equal the Title.Text value of the first day on display. For days being displayed in the
next month, Abs(Title.Text - ThisItem.Value) will always equal the MonthDayGallery item value
of the first cell of that month (in this case, October 1st) minus 1. And, most importantly, for days
displayed in the currently selected month, Abs(Title.Text - ThisItem.Value) will also always equal
the value of the first item of that month minus 1 and will never exceed 5, as the previous example
shows. So it is perfectly valid to write the formula as Abs(Title.Text - ThisItem.Value) > 5 .
This statement checks whether the date value is outside of the currently selected month. If it is, Fill is
a partially opaque gray.

NOTE
You can check the validity of this last comparison for yourself by inserting a Label control into the gallery and
setting its Text property to this value:
Abs(Title.Text - ThisItem.Value) .

Property: Visible
Value:

!(
DateAdd( _firstDayInView, ThisItem.Value, Days ) -
Weekday( DateAdd( _firstDayInView, ThisItem.Value,Days ) ) + 1
> _lastDayOfMonth
)

The preceding statement checks whether the cell is in a row where no days of the currently selected month
occur. Recall that subtracting the weekday value of any day from its date value and adding 1 always returns
the first item in the row that day lives in. So this statement checks whether the first day in the row is after
the last day of the viewable month. If it is, it won't appear because the entire row contains days of the
following month.
Property: OnSelect
Value: A Set function that sets the _dateSelected variable to the date of the selected cell:

Set( _dateSelected, DateAdd( _firstDayInView, ThisItem.Value, Days ) )

Circle control in the calendar gallery

Property: Visible
Value: A formula that determines whether any events are scheduled for the selected date and whether the
Subcircle and Title controls are visible:
CountRows(
Filter( MyCalendarEvents,
DateValue( Text( Start ) ) = DateAdd( _firstDayInView, ThisItem.Value, Days )
)
) > 0 && !Subcircle.Visible && Title.Visible

The Circle control is visible if the Start field for any event is equivalent to the date of that cell, if the Title
control is visible, and if the Subcircle control isn't visible. In other words, this control is visible when at least
one event occurs on this day, and this day isn't selected. If it is selected, the events for that day are displayed
in the CalendarEventsGallery control.
Subcircle control in the calendar gallery

Property: Visible
Value:

DateAdd( _firstDayInView, ThisItem.Value ) = _dateSelected && Title.Visible

The Subcircle control is visible when _dateSelected is equivalent to the date of the cell, and the Title
control is visible. In other words, this control appears when the cell is the currently selected date.

Events gallery

Property: Items
Value: A formula that sorts and filters the events gallery:
SortByColumns(
Filter( MyCalendarEvents,
Text( Start, DateTimeFormat.ShortDate ) = Text( _dateSelected, DateTimeFormat.ShortDate )
),
"Start"
)

The MyCalendarEvents collection contains all the events between _minDate and _maxDate. In order to
display the events for only the date selected, a filter is applied on MyCalendarEvents to display the events
that have a start date equivalent to \ _dateSelected. The items are then sorted by their start dates to put
them in sequential order.

Next steps
Learn more about this screen
Learn more about the Office 365 Outlook connector in PowerApps
Learn more about the Office 365 Users connector in PowerApps
Overview of the email-screen template for canvas
apps
1/23/2019 • 4 minutes to read • Edit Online

In a canvas app, add an email screen that lets users send an email from their Office 365 Outlook account. Users
can search for recipients in their orgs and add external email addresses, too. You can add image-attachment
support, change the user data that appears in the search gallery, and make other customizations.
You can also add other template-based screens that show different data from Office 365, such as a user's calendar,
people in an organization, and availability of the people users might want to invite to a meeting.
This overview teaches you:
How to use the default email screen.
How to modify it.
How to integrate it into an app.
For a deeper dive into this screen's default functionality, see the email-screen reference.

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Default functionality
To add an email screen from the template:
1. Sign in to PowerApps, and then create an app or open an existing app in PowerApps Studio.
This topic shows a phone app, but the same concepts apply to a tablet app.
2. On the Home tab of the ribbon, select New screen > Email.
By default, the screen looks similar to this:
A few helpful notes:
To search for users in your org, start typing their name in the text input box below "To".
When searching for people, only the top 15 results will be returned.
To add email addresses for email recipients outside your org, type out the full, valid email address, and select
the '+' icon that appears to the right of it.
You must add at least one person as a recipient and provide a subject to send an email.
After you send the email, the contents of the subject line and message body, as well as the recipient list will all
be erased.

Modify the screen


You can modify the default functionality of this screen in a few common ways:
Add image-attachment support
Show different data for people
If you want to modify the screen further, use the email-screen reference as a guide.

IMPORTANT
The following steps assume that you've added only one email screen to the app. If you've added more than one, control
names (such as iconMail1) will end with a different number, and you'll need to adjust the formulas accordingly.

Add image -attachment support


This allows users to send a single image with their email as an attachment.
1. On the Insert tab, select Media, and then select Add picture.
2. Set the new control's Y property to this expression:
TextEmailMessage1.Y + TextEmailMessage1.Height + 20

3. With the AddMediaWithImage control inserted, set its height to be less than 210.
4. In the control tree view, select AddMediaWithImage > ... > Reorder > Send to back. This prevents the
control from sitting in front of the PeopleBrowseGallery control.
5. Change the Height property of EmailPeopleGallery to this formula:

Min(
( EmailPeopleGallery1.TemplateHeight + EmailPeopleGallery1.TemplatePadding * 2 ) *
RoundUp( CountRows( EmailPeopleGallery1.AllItems ) / 2, 0 ),
304
)

6. Set the ShowScrollbar property of EmailPeopleGallery to this expression:


EmailPeopleGallery1.Height >= 304

This prevents the max height from pushing the AddMediaWithImage control off the page.
7. Change the OnSelect property of the iconMail control to this formula:

Set( _emailRecipientString, Concat(MyPeople, Mail & ";") );


If( IsBlank( UploadedImage1 ),
'Office365'.SendEmail( _emailRecipientString,
TextEmailSubject1.Text,
TextEmailMessage1.Text,
{ Importance: "Normal" }
),
'Office365'.SendEmail( _emailRecipientString,
TextEmailSubject1.Text,
TextEmailMessage1.Text,
{
Importance: "Normal",
Attachments: Table(
{
Name: "Image.jpg",
ContentBytes: UploadedImage1.Image
}
)
}
)
);
Reset( TextEmailSubject1 );
Reset( TextEmailMessage1 );
Reset( AddMediaButton1 );
Clear( MyPeople )

This formula checks for an uploaded image. If there is none, then it uses the same Office365.SendEmail
operation as before. If there is an image, it is added as an attachment in the Attachments table. After
sending the email, an additional Reset operation is performed on AddMediaButton to remove the
uploaded image.

NOTE
To add more than one attachment to an email, add records to the Attachments table.

Show different data for people


This screen uses the Office365Users.SearchUser operation to search for users in your org. It provides additional
fields for each event beyond what appears in the PeopleBrowseGallery control. Adding or changing fields in the
gallery is simple:
1. In the PeopleBrowseGallery control, select a label to modify (or add one and keep it selected).
2. With its Text property selected, in the formula bar, replace the contents with ThisItem.

IntelliSense shows a list of fields that you can select.


3. Select the field that you want.
The Text property updates to ThisItem.{FieldSelection} .

Integrate the screen into an app


The email screen is a powerful bundle of controls in its own right, but it usually performs best as part of a larger,
more versatile app. You can integrate this screen into a larger app in a number of ways, including linking to the
calendar screen.
Linking to the calendar screen
Follow the steps outlined in the "Show event attendees" section of Calendar screen overview but, in the final step,
set the Navigate function to open the email screen. After you complete these steps, the MyPeople collection is
populated, which allows users to send email to the people who are attending the selected event.

NOTE
Sending this email will send a separate email from the actual event in your Outlook.

Next steps
View the reference documentation for this screen.
Learn more about the Office 365 Users connector in PowerApps.
See all available connections in PowerApps.
Reference information about the email-screen
template for canvas apps
1/23/2019 • 4 minutes to read • Edit Online

For canvas apps in PowerApps, understand how each significant control in the email-screen template contributes
to the screen's overall default functionality. This deep dive presents the behavior formulas and the values of other
properties that determine how the controls respond to user input. For a high-level discussion of this screen's
default functionality, see the email-screen overview.
This topic highlights some significant controls and explains the expressions or formulas to which various
properties (such as Items and OnSelect) of these controls are set:
Text search box
Add Icon
People browse gallery
Email people gallery (+ child controls)
Mail icon

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Text search box

Several other controls in the screen have a dependency on the Text search box control:
If a user starts typing any text, PeopleBrowseGallery appears.
If a user types out a valid email address, AddIcon appears.
When a user selects a person within PeopleBrowseGallery, the search contents are reset.

Add icon
The Add icon control allows app users to add people who don't exist inside their org to the recipient list of the
email being composed.
Property: Visible
Value: Logic to show the control only when a user types a valid email address into the search box:

!IsBlank( TextSearchBox.Text ) &&


IsMatch( TextSearchBox.Text, Match.Email ) &&
Not( Trim( TextSearchBox.Text ) in MyPeople.UserPrincipalName )

Line by line, the preceding code block says that the Add icon control will be visible only if:
TextSearchBox contains text.
The text in TextSearchBox is a valid email address.
The text in TextSearchBox doesn't already exist in the MyPeople collection.
Property: OnSelect
Value: Selecting this adds the valid email address to the MyPeople collection. This collection is used by the
screen as the recipient list:

Collect( MyPeople,
{
DisplayName: TextSearchBox.Text,
UserPrincipalName: TextSearchBox.Text,
Mail: TextSearchBox.Text
}
);
Reset( TextSearchBox )

This code block adds a row to the MyPeople collection and populates three fields with the text in
TextSearchBox. These three fields are DisplayName, UserPrincipalName, and Mail. It then resets the
contents of TextSearchBox.

People browse gallery

Property: Items
Value: The top 15 search results of the search text typed into the TextSearchBox control:

If( !IsBlank( Trim(TextSearchBox.Text ) ),


'Office365Users'.SearchUser( {searchTerm: Trim( TextSearchBox.Text ), top: 15} )
)

The items of this gallery are populated by search results from the Office365.SearchUser operation. The
operation takes the text in Trim(TextSearchBox) as its search term and returns the top 15 results based on
that search.
TextSearchBox is wrapped in a Trim() function because a user search on spaces is invalid. The
Office365Users.SearchUser operation is wrapped in an If(!IsBlank(Trim(TextSearchBox.Text)) ... )
function, which means that the operation is performed only if the search box contains user-entered text.
This improves performance.
People browse gallery Title control

Property: Text
Value: ThisItem.DisplayName
Displays the person's display name from their Office 365 profile.
Property: OnSelect
Value: Code to add the user to an app-level collection, and then select the user:

Concurrent(
Set( _selectedUser, ThisItem ),
Reset( TextSearchBox ),
If( Not( ThisItem.UserPrincipalName in MyPeople.UserPrincipalName ),
Collect( MyPeople, ThisItem )
)
)

Selecting this control does three things concurrently:


Sets the _selectedUser variable to the item selected.
Resets the search term in TextSearchBox.
Adds the selected item to the MyPeople collection, a collection of all the selected users that the email screen
uses as a set of recipients.

Email people gallery


Property: Items
Value: MyPeople
This is the collection of people initialized or added to by selecting the PeopleBrowseGallery Title control.
Property: Height
Value: Logic to set the height, based on the number of items currently in the gallery:

Min(
( EmailPeopleGallery.TemplateHeight + EmailPeopleGallery.TemplatePadding * 2) *
RoundUp(CountRows(EmailPeopleGallery.AllItems) / 2, 0 ),
304
)

The height of this gallery adjusts to the number of items in the gallery, with a maximum height of 304.
It takes TemplateHeight + TemplatePadding * 2 as the total height of a single row of EmailPeopleGallery,
then multiplies it by the number of rows. Since WrapCount = 2 , the number of true rows is
RoundUp(CountRows(EmailPeopleGallery.AllItems) / 2, 0) .

Property: ShowScrollbar
Value: EmailPeopleGallery.Height >= 304

When the height of the gallery reaches 304, the scroll bar is visible.
Email people gallery Title control

Property: OnSelect
Value: Set(_selectedUser, ThisItem)

Sets the _selectedUser variable to the item selected in EmailPeopleGallery.


Email people gallery iconRemove control

Property: OnSelect
Value: Remove( MyPeople, LookUp( MyPeople, UserPrincipalName = ThisItem.UserPrincipalName ) )

Looks up the record in the MyPeople collection, where UserPrincipalName matches the
UserPrincipalName of the selected item, and removes that record from the collection.

Mail icon
Property: OnSelect
Value: Logic to send the user's email message:

Set( _emailRecipientString, Concat( MyPeople, Mail & ";" ) );


'Office365'.SendEmail( _emailRecipientString,
TextEmailSubject.Text,
TextEmailMessage.Text,
{ Importance:"Normal" }
);
Reset( TextEmailSubject );
Reset( TextEmailMessage );
Clear( MyPeople )

Sending an email message requires a semicolon-separated string of email addresses. In the preceding
code:
1. The first line of code takes the Mail field from all the rows in the MyPeople collection, concatenates
them into a single string of email addresses separated by semicolons, and sets the
_emailRecipientString variable to that string value.
2. It then uses the Office365.SendEmail operation to send the email to the recipients. The operation
has three required parameters, To, Subject, and Body, and one optional parameter--Importance.
In the preceding code, these are _emailRecipientString, TextEmailSubject.Text,
TextEmailMessage.Text, and Normal, respectively.
3. Finally, it resets the TextEmailSubject and TextEmailMessage controls and clears the MyPeople
collection.
Property: DisplayMode
Value:
If( Len( Trim( TextEmailSubject.Text ) ) > 0 && !IsEmpty( MyPeople ), DisplayMode.Edit,
DisplayMode.Disabled )
For an email to be sent, the email subject line must have text, and the recipient (MyPeople) collection must
not be empty.

Next steps
Learn more about this screen
Learn more about the Office 365 Outlook connector in PowerApps
Learn more about the Office 365 Users connector in PowerApps
Overview of the meeting-screen template for canvas
apps
1/23/2019 • 2 minutes to read • Edit Online

In a canvas app, add a meeting screen that lets users create and send meeting requests from their Office 365
Outlook accounts. Users can search for attendees in their org and add external email addresses. If your tenant has
meeting rooms built into Outlook, users can select a location as well.
You can also add other template-based screens that show different data from Office 365, such as email, people in
an organization, and a user's calendar.
This overview teaches you about the high-level functionality of the screen.
For a deeper dive into this screen's default functionality, see the meeting-screen reference.

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Default functionality
To add a meeting screen from the template:
1. Sign in to PowerApps, and then create an app or open an existing app in PowerApps Studio.
This topic shows a phone app, but the same concepts apply to a tablet app.
2. On the Home tab of the ribbon, select New screen > Meeting.
When filled out, both tabs of the meeting screen look similar to this:
A few helpful notes:
The meeting screen allows an app user to create a meeting in Outlook. Users can search for and add attendees
and, optionally, add a meeting room to the meeting.
To search for a user in your org, start typing their name in the text-input box under "Attendees".
When you search for people, only the top 15 results are returned.
To add email addresses for attendees outside your org, type out the full, valid email address, and select the '+'
icon that appears to the right of the email address.
To create a meeting, you must add at least one person as an attendee, provide a subject, and select a meeting
time in the Schedule tab.
After you send the meeting request, all information for that meeting is cleared.
The OnSelect statement of the Send icon (upper-right corner) contains this formula:

Set( _myCalendarName,
LookUp( 'Office365'.CalendarGetTables().value, DisplayName = "Calendar" ).Name
);

"Calendar" is the default display name for most Office user's calendars, but your org might differ. If so, you can
change "Calendar" to the appropriate term for your org.
You get an error if you try to schedule a meeting that occurs in the past or add more than 20 people to a
meeting.

Next steps
View the reference documentation for this screen.
Learn more about the Office 365 Outlook connector.
Learn more about the Office 365 Users connector.
Reference information about the meeting-screen
template for canvas apps
1/23/2019 • 18 minutes to read • Edit Online

For canvas apps in PowerApps, understand how each significant control in the meeting-screen template
contributes to the screen's overall default functionality. This deep dive presents the behavior formulas and the
values of other properties that determine how the controls respond to user input. For a high-level discussion of
this screen's default functionality, see the meeting-screen overview.
This topic highlights some significant controls and explains the expressions or formulas to which various
properties (such as Items and OnSelect) of these controls are set:
Invite tab (LblInviteTab)
Schedule tab (LblScheduleTab)
Text search box
Add icon (AddIcon)
People browse gallery (+ child controls)
Meeting people gallery (+ child controls)
Meeting date picker (MeetingDateSelect)
Meeting duration drop-down (MeetingDurationSelect)
Find meeting times gallery (+ child controls)
Room browse gallery (+ child controls)
Back chevron (RoomsBackNav) (may not be visible if tenant doesn't have rooms lists)
Send icon

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Invite tab

Property: Color
Value: If( _showDetails, LblRecipientCount.Color, RectQuickActionBar.Fill )

_showDetails is a variable used to determine whether the LblInviteTab control or the LblScheduleTab
control is selected. If the value of _showDetails is true, LblScheduleTab is selected; if the value is false,
LblInviteTab is selected. That means that if the value of _showDetails is true (this tab isn't selected), the
tab color matches that of LblRecipientCount. Otherwise, it matches the fill value of RectQuickActionBar.
Property: OnSelect
Value: Set( _showDetails, false )

Sets the _showDetails variable to false, which means the contents of the Invite tab are visible, and the
contents of the Schedule tab are hidden.

Schedule tab

Property: Color
Value: If( !_showDetails, LblRecipientCount.Color, RectQuickActionBar.Fill )

_showDetails is a variable used to determine whether the LblInviteTab control or the LblScheduleTab
control is selected. If it's true, LblScheduleTab is selected; if false, LblInviteTab is. This means that if
_showDetails is true (this tab is selected), the tab color matches the fill value of RectQuickActionBar.
Otherwise, it matches the color value of LblRecipientCount.
Property: OnSelect
Value: Set( _showDetails, true )

Sets the _showDetails variable to true, which means the contents of the Schedule tab are visible, and the
contents of the Invite tab are hidden.

Text search box


Several other controls in the screen have a dependency on this one:
If a user starts typing any text, PeopleBrowseGallery becomes visible.
If a user types a valid email address, AddIcon becomes visible.
When a user selects a person within PeopleBrowseGallery the search contents are reset.

Add icon

This control allows users to add people who don't exist inside their org to the attendee list for the meeting being
composed.
Property: Visible
Value: Three logical checks that all must evaluate to true for the control to be visible:

!IsBlank( TextSearchBox.Text ) &&


IsMatch( TextSearchBox.Text, Match.Email ) &&
Not( Trim( TextSearchBox.Text ) in MyPeople.UserPrincipalName )

Line by line, this code block says that the AddIcon control is visible only if:
The TextSearchBox contains text.
The text in TextSearchBox is a valid email address.
The text in TextSearchBox doesn't already exist in the MyPeople collection.
Property: OnSelect
Value: A Collect statement to add the user to the attendee list, another to refresh available meeting times,
and several variable toggles:
Collect( MyPeople,
{
DisplayName: TextSearchBox.Text,
UserPrincipalName: TextSearchBox.Text,
Mail: TextSearchBox.Text
}
);
Concurrent(
Reset( TextSearchBox ),
Set( _showMeetingTimes, false ),
UpdateContext( { _loadMeetingTimes: true } ),
Set( _selectedMeetingTime, Blank() ),
Set( _selectedRoom, Blank() ),
Set( _roomListSelected, false ),
ClearCollect( MeetingTimes,
AddColumns(
'Office365'.FindMeetingTimes(
{
RequiredAttendees: Concat(MyPeople, UserPrincipalName & ";")
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: Text( DateAdd( MeetingDateSelect.SelectedDate, 8, Hours ), UTC ),
End: Text( DateAdd( MeetingDateSelect.SelectedDate, 17, Hours ), UTC ),
MaxCandidates: 15,
MinimumAttendeePercentage:1,
IsOrganizerOptional: false,
ActivityDomain: "Work"
}
).MeetingTimeSuggestions,
"StartTime", MeetingTimeSlot.Start.DateTime,
"EndTime", MeetingTimeSlot.End.DateTime
)
)
);
UpdateContext( { _loadingMeetingTimes: false } );
Set( _showMeetingTimes, true )

Selecting this control adds the valid email address (visible only if a valid email address is typed into
TextSearchBox) to the MyPeople collection (this collection is the attendee list) and then refreshes the
available meeting times with the new user entry.
At a low level, this code block:
1. Collects the email address into the MyPeople collection, collecting the email address into the
DisplayName, UserPrincipalName, and Mail fields.
2. Resets the contents of the TextSearchBox control.
3. Sets the _showMeetingTimes variable to false. This variable controls the visibility of
FindMeetingTimesGallery, which displays open times for the selected attendees to meet.
4. Sets the _loadMeetingTimes context variable to true. This variable sets a loading state, which toggles
the visibility of loading state controls like _LblTimesEmptyState to indicate to the user that their data is
being loaded.
5. Sets _selectedMeetingTime to Blank(). _selectedMeetingTime is the selected record from the
FindMeetingTimesGallery control. It is blanked here because the addition of another attendee might
mean that the previous definition of _selectedMeetingTime is not be available for that attendee.
6. Sets _selectedRoom to Blank(). _selectedRoom is the selected room record from
RoomBrowseGallery. The room availabilities are determined from the value of
_selectedMeetingTime. With that value blanked, the _selectedRoom value is no longer valid, so it
must be blanked.
7. Sets _roomListSelected to false. This line may not be applicable to everyone. In Office, you can group
your rooms by different "room lists." If you have room lists, this screen accounts for that, allowing you to
first select a room list before selecting a room from within that list. The value of _roomListSelected is
what determines whether a user (in a tenant with room lists only) will be viewing rooms within a room
list or the set of room lists. It's set to false to force users to reselect a new room list.
8. Uses the Office365.FindMeetingTimes operation to determine and collect the available meeting times
for the attendees. This operation passes:
The UserPrincipalName of each selected user into the RequiredAttendees parameter.
MeetingDurationSelect.Selected.Minutes into the MeetingDuration parameter.
MeetingDateSelect.SelectedDate + 8 hours into the Start parameter. Eight hours is added
because, by default, the full date/time for the calendar control is 12:00 AM of the selected date.
You probably want to retrieve availabilities within normal working hours. A normal work start
time would be 8:00 AM.
MeetingDateSelect.SelectedDate + 17 hours into the End parameter. 17 hours is added
because 12:00 AM + 17 = 5:00 PM. A normal work end time would be 5:00 PM.
15 into the MaxCandidates parameter. This means the operation returns only the top 15 available
times for the selected date. This makes sense because there are only sixteen 30-minute chunks in
an 8-hour work day, and a 30-minute meeting is the minimum one can set in this screen.
1 into the MinimumAttendeePercentage parameter. Essentially, unless no attendees are available,
the meeting time is retrieved.
false into the IsOrganizerOptional parameter. The app user is not an optional attendee for this
meeting.
"Work" into the ActivityDomain parameter. This means the times retrieved are only those within a
normal working time period.
9. The ClearCollect function also adds two columns: "StartTime" and "EndTime". This simplifies the data
returned. The field containing the available start and end times is the MeetingTimeSlot field. This field
is a record containing the Start and End records, which themselves contain the DateTime and
TimeZone values of their respective suggestion. Instead of attempting to retrieve this nesting of
records, adding the "StartTime" and "EndTime" columns to the MeetingTimes collection brings those
Start > DateTime and End > DateTime values to the surface of the collection.
10. Once these functions have all completed, the _loadingMeetingTimes variable is set to false, removing
the loading state, and _showMeetingTimes is set to true, displaying FindMeetingTimesGallery.

People browse gallery

Property: Items
Value:

If( !IsBlank( Trim( TextSearchBox.Text ) ),


'Office365Users'.SearchUser( { searchTerm: Trim(TextSearchBox.Text), top: 15 } )
)

The items of this gallery are populated by search results from the Office365.SearchUser operation. The operation
takes the text in Trim(**TextSearchBox**) as its search term and returns the top 15 results based on that search.
TextSearchBox is wrapped in a Trim function because a user search on spaces isn't valid. The
Office365Users.SearchUser operation is wrapped in an If(!IsBlank(Trim(TextSearchBox.Text)) ... ) function
because retrieving search results before a user has searched is a performance waste.
People browse gallery Title

Property: Text
Value: ThisItem.DisplayName
Displays the person's display name from their Office 365 profile.
Property: OnSelect
Value: A Collect statement to add the user to the attendee list, another to refresh available meeting times,
and several variable toggles:
Concurrent(
Reset( TextSearchBox ),
Set( _selectedUser, ThisItem ),
If( Not( ThisItem.UserPrincipalName in MyPeople.UserPrincipalName ),
Collect( MyPeople, ThisItem );
Concurrent(
Set( _showMeetingTimes, false ),
UpdateContext( { _loadMeetingTimes: true } ),
Set( _selectedMeetingTime, Blank() ),
Set( _selectedRoom, Blank() ),
Set( _roomListSelected, false ),
ClearCollect( MeetingTimes,
AddColumns(
'Office365'.FindMeetingTimes(
{
RequiredAttendees: Concat( MyPeople, UserPrincipalName & ";" ),
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: Text( DateAdd( MeetingDateSelect.SelectedDate, 8, Hours ), UTC ),
End: Text( DateAdd( MeetingDateSelect.SelectedDate, 17, Hours ), UTC ),
MaxCandidates: 15,
MinimumAttendeePercentage: 1,
IsOrganizerOptional: false,
ActivityDomain: "Work"
}
).MeetingTimeSuggestions,
"StartTime", MeetingTimeSlot.Start.DateTime,
"EndTime", MeetingTimeSlot.End.DateTime
)
)
);
UpdateContext( { _loadingMeetingTimes: false } );
Set( _showMeetingTimes, true )
)
)

At a high level, selecting this control adds the person to the MyPeople collection (the app's storage of the
attendee list), and refreshes the available meeting times based on the new user addition.
Selecting this control is very similar to selecting the AddIcon control; the only difference is that the
Set(_selectedUser, ThisItem) statement and the execution order of the operations. As such, this discussion
won't be as deep. For a fuller explanation, read through the AddIcon control section.
Selecting this control resets TextSearchBox. Then, if the selection is not in the MyPeople collection, the
control:
1. Sets the _loadMeetingTimes state to true and the _showMeetingTimes state to false, blanks the
_selectedMeetingTime and _selectedRoom variables, and refreshes the MeetingTimes collection
with the new addition to the MyPeople collection.
2. Sets the _loadMeetingTimes state to false, and sets _showMeetingTimes to true. If the selection is
already in the MyPeople collection, it resets only the contents of TextSearchBox.

Meeting people gallery


Property: Items
Value: MyPeople
The MyPeople collection is the collection of people initialized or added to by selecting the
PeopleBrowseGallery Title control.
Property: Height
Value: Logic to allow the gallery to grow to a maximum height of 350:

Min(
76 * RoundUp( CountRows( MeetingPeopleGallery.AllItems ) / 2, 0 ),
350
)

The height of this gallery adjusts to the number of items in the gallery, to a maximum height of 350. The
formula takes 76 as the height of a single row of MeetingPeopleGallery, then multiplies it by the number
of rows. The WrapCount property is set to 2, so the number of true rows is
RoundUp(CountRows(MeetingPeopleGallery.AllItems) / 2, 0) .

Property: ShowScrollbar
Value: MeetingPeopleGallery.Height >= 350

When the maximum height of the gallery is reached (350), the scroll bar is visible.
Meeting people gallery Title

Property: OnSelect
Value: Set(_selectedUser, ThisItem)

Sets the _selectedUser variable to the item selected in MeetingPeopleGallery.


Meeting people gallery iconRemove

Property: OnSelect
Value: A Remove statement to remove the user from the attendee list, a Collect statement to refresh
available meeting times, and several variable toggles:

Remove( MyPeople, LookUp( MyPeople, UserPrincipalName = ThisItem.UserPrincipalName ) );


Concurrent(
Reset( TextSearchBox ),
Set( _showMeetingTimes, false ),
UpdateContext( { _loadMeetingTimes: true } ),
Set( _selectedMeetingTime, Blank() ),
Set( _selectedRoom, Blank() ),
Set( _roomListSelected, false ),
ClearCollect( MeetingTimes,
AddColumns(
'Office365'.FindMeetingTimes(
{
RequiredAttendees: Concat( MyPeople, UserPrincipalName & ";" ),
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: Text( DateAdd( MeetingDateSelect.SelectedDate, 8, Hours ), UTC ),
End: Text( DateAdd( MeetingDateSelect.SelectedDate, 17, Hours ), UTC ),
MaxCandidates: 15,
MinimumAttendeePercentage: 1,
IsOrganizerOptional: false,
ActivityDomain: "Work"
}
).MeetingTimeSuggestions,
"StartTime", MeetingTimeSlot.Start.DateTime,
"EndTime", MeetingTimeSlot.End.DateTime
)
)
);
UpdateContext( { _loadingMeetingTimes: false } );
Set( _showMeetingTimes, true )

At a high level, selecting this control removes the person from the attendee list and refreshes the available
meeting times based on the removal of this person.
After the first line of the preceding code, selecting this control is almost identical to selecting the AddIcon
control. As such, this discussion will not be as deep. For a fuller explanation, read through the AddIcon
control section.
In the first line of code, the selected item is removed from the MyPeople collection. The code then:
1. Resets TextSearchBox, and then removes the selection from the MyPeople collection.
2. Sets the _loadMeetingTimes state to true and the _showMeetingTimes state to false, blanks the
_selectedMeetingTime and _selectedRoom variables, and refreshes the MeetingTimes collection
with the new addition to the MyPeople collection.
3. Sets the _loadMeetingTimes state to false, and sets _showMeetingTimes to true.

Meeting date picker

Property: DisplayMode
Value: If( IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit )

A date for a meeting cannot be chosen until at least one attendee has been added to the MyPeople
collection.
Property: OnChange
Value: Select( MeetingDateSelect )

Changing the selected date triggers the code in the OnSelect property of this control to run.
Property: OnSelect
Value: A Collect statement to refresh available meeting times, and several variable toggles:

Concurrent(
Reset( TextSearchBox ),
Set( _showMeetingTimes, false ),
UpdateContext( { _loadingMeetingTimes: true } ),
Set( _selectedMeetingTime, Blank() ),
Set( _selectedRoom, Blank() ),
Set( _roomListSelected, false ),
ClearCollect( MeetingTimes,
AddColumns(
'Office365'.FindMeetingTimes(
{
RequiredAttendees: Concat( MyPeople, UserPrincipalName & ";" ),
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: Text( DateAdd( MeetingDateSelect.SelectedDate, 8, Hours ), UTC ),
End: Text( DateAdd( MeetingDateSelect.SelectedDate, 17, Hours ), UTC ),
MaxCandidates: 15,
MinimumAttendeePercentage: 1,
IsOrganizerOptional: false,
ActivityDomain: "Work"
}
).MeetingTimeSuggestions,
"StartTime", MeetingTimeSlot.Start.DateTime,
"EndTime", MeetingTimeSlot.End.DateTime
)
)
);
UpdateContext( { _loadingMeetingTimes: false } );
Set( _showMeetingTimes, true )

At a high level, selecting this control refreshes the available meeting times. It is valuable because if a user
changes the date, the available meeting times need to update to reflect the attendees' availabilities for that
day.
With the exception of the initial Collect statement, this is identical to the OnSelect functionality of the
AddIcon control. As such, this discussion will not be as deep. For a fuller explanation, read through the
AddIcon control section.
Selecting this control resets TextSearchBox. It then:
1. Sets the _loadMeetingTimes state to true and the _showMeetingTimes state to false, blanks the
_selectedMeetingTime and _selectedRoom variables, and refreshes the MeetingTimes collection
with the new date selection.
2. Sets the _loadMeetingTimes state to false, and sets _showMeetingTimes to true.

Meeting duration drop-down

Property: DisplayMode
Value: If( IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit )

A duration for a meeting cannot be chosen until at least one attendee has been added to the MyPeople
collection.
Property: OnChange
Value: Select(MeetingDateSelect1)
Changing the selected duration triggers the code in the OnSelect property of the MeetingDateSelect
control to run.

Find meeting times gallery

Property: Items
Value: MeetingTimes
The collection of potential meeting times retrieved from the Office365.FindMeetingTimes operation.
Property: Visible
Value: _showMeetingTimes && _showDetails && !IsEmpty( MyPeople )

The gallery is visible only if _showMeetingTimes is set to true, the user has selected the LblScheduleTab
control, and there is at least one attendee added to the meeting.
Find meeting times gallery Title

Property: Text
Value: A conversion of the start time to be displayed in the user's local time:

Text(
DateAdd(
DateTimeValue( ThisItem.StartTime ),
- TimeZoneOffset(),
Minutes
),
DateTimeFormat.ShortTime
)

The retrieved value of StartTime is in UTC format. To convert from UTC to local time, the DateAdd
function is applied. The Text function takes a date/time as its first argument, and formats it based on its
second argument. You pass it the local time conversion of ThisItem.StartTime, and display it as
DateTimeFormat.ShortTime.
Property: OnSelect
Value: Several Collect statements to gather meeting rooms and their suggested availabilities, as well as
several variable toggles:
Set( _selectedMeetingTime, ThisItem );
UpdateContext( { _loadingRooms: true } );
If( IsEmpty( RoomsLists ),
ClearCollect( RoomsLists, 'Office365'.GetRoomLists().value) );
If( CountRows( RoomsLists ) <= 1,
Set( _noRoomLists, true );
ClearCollect( AllRooms, 'Office365'.GetRooms().value );
Set( _allRoomsConcat, Concat( FirstN( AllRooms, 20 ), Address & ";" ) );
ClearCollect( RoomTimeSuggestions,
'Office365'.FindMeetingTimes(
{
RequiredAttendees: _allRoomsConcat,
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: _selectedMeetingTime.StartTime & "Z",
End: _selectedMeetingTime.EndTime & "Z",
MinimumAttendeePercentage: "1",
IsOrganizerOptional: "false",
ActivityDomain: "Unrestricted"
}
).MeetingTimeSuggestions
);
ClearCollect( AvailableRooms,
AddColumns(
AddColumns(
Filter(
First( RoomTimeSuggestions ).AttendeeAvailability,
Availability="Free"
),
"Address", Attendee.EmailAddress.Address
),
"Name", LookUp( AllRooms, Address = Attendee.EmailAddress.Address ).Name
)
);
ClearCollect( AvailableRoomsOptimal,
DropColumns(
DropColumns( AvailableRooms, "Availability" ),
"Attendee"
)
),
Set( _roomListSelected, false)
);
UpdateContext( {_loadingRooms: false} )

At a high level, this code block gathers available rooms for users who don't have rooms lists, based on the
selected date/time for the meeting. Otherwise, it simply retrieves the rooms lists.
At a low level, this code block:
1. Sets _selectedMeetingTime to the selected item. This is used to find what rooms are available during
that time.
2. Sets the loading state variable _loadingRooms to true, turning the loading state on.
3. If the RoomsLists collection is empty, it retrieves the user's tenant's rooms lists and stores them in the
RoomsLists collection.
4. If the user has no room list or one room list:
a. The noRoomLists variable is set to true, and this variable is used to determine the items
displayed in the RoomBrowseGallery control.
b. The Office365.GetRooms() operation is used to retrieve the first 100 rooms in their tenant. These
are stored in the AllRooms collection.
c. The _allRoomsConcat variable is set to a semicolon-separated string of the first 20 email
addresses of the rooms in the AllRooms collection. This is because the
Office365.FindMeetingTimes is limited to searching for the available times of 20 person objects
in a single operation.
d. The RoomTimeSuggestions collection uses the Office365.FindMeetingTimes to retrieve the
availabilities of the first 20 rooms in the AllRooms collection, based on the time values from the
_selectedMeetingTime variable. Note that the & "Z" is used to properly format the DateTime
value.
e. The AvailableRooms collection is created. This is simply the RoomTimeSuggestions collection
of attendee availabilities with two additional columns added to it: "Address" and "Name".
"Address" is the email address of the room, and "Name" is the name of the room.
f. Then, the AvailableRoomsOptimal collection is created. This is just the AvailableRooms
collection with the "Availability" and "Attendee" columns removed. Doing this matches the
schemas of AvailableRoomsOptimal and AllRooms. This allows you to use both collections in
the Items property of the RoomBrowseGallery.
g. _roomListSelected is set to false.
5. The loading state, _loadingRooms, is set to false once everything else has finished executing.

Room browse gallery

Property: Items
Value: Logically set to two internal collections of identical schema, depending on whether the user has
selected a room list or has rooms lists in their tenant:

Search(
If( _roomListSelected || _noRoomLists, AvailableRoomsOptimal, RoomsLists ),
Trim(TextMeetingLocation1.Text),
"Name",
"Address"
)

This gallery displays the AvailableRoomsOptimal collection if _roomListSelected or _noRoomLists is


true. Otherwise, it displays the RoomsLists collection. This can be done because the schema of these
collections are identical.
Property: Visible
Value: _showDetails && !IsBlank( _selectedMeetingTime ) && !_loadingRooms

The gallery is visible only if the three preceding statements evaluate to true.
RoomBrowseGallery Title
Property: OnSelect
Value: A set of logically bound Collect and Set statements, which might or might not be triggered,
depending on whether the user is viewing room lists or rooms:

UpdateContext( { _loadingRooms: true } );


If( !_roomListSelected && !noRoomLists,
Set( _roomListSelected, true );
Set( _selectedRoomList, ThisItem.Name );
ClearCollect( AllRooms, 'Office365'.GetRoomsInRoomList( ThisItem.Address ).value );
Set( _allRoomsConcat, Concat( FirstN( AllRooms, 20 ), Address & ";" ) );
ClearCollect( RoomTimeSuggestions,
'Office365'.FindMeetingTimes(
{
RequiredAttendees: _allRoomsConcat,
MeetingDuration: MeetingDurationSelect.Selected.Minutes,
Start: _selectedMeetingTime.StartTime & "Z",
End: _selectedMeetingTime.EndTime & "Z",
MinimumAttendeePercentage: "1",
IsOrganizerOptional: "false",
ActivityDomain: "Unrestricted"
}
).MeetingTimeSuggestions
);
ClearCollect( AvailableRooms,
AddColumns(
AddColumns(
Filter(
First( RoomTimeSuggestions ).AttendeeAvailability,
Availability = "Free"
),
"Address", Attendee.EmailAddress.Address
),
"Name", LookUp( AllRooms, Address = Attendee.EmailAddress.Address ).Name
)
);
ClearCollect( AvailableRoomsOptimal,
DropColumns(
DropColumns( AvailableRooms, "Availability" )
),
"Attendee" )
),
Set( _selectedRoom, ThisItem )
);
UpdateContext( {_loadingRooms: false} )

The actions that occur when this control is selected depend on whether a user is currently viewing a set of
room lists or a set of rooms. If it's the former, then selecting this control retrieves the rooms that are
available at the selected time from the selected room list. If it's the latter, selecting this control sets the
_selectedRoom variable to the selected item. The preceding statement is very similar to the Select
statement for FindMeetingTimesGallery Title.
At a low level, the preceding code block:
1. Turns the loading state for the rooms on by setting _loadingRooms to true.
2. Checks to see if a room list has been selected, and if the tenant has room lists. If so:
a. Sets _roomListSelected to true and sets _selectedRoomList to the selected item.
b. The _allRoomsConcat variable is set to a semicolon-separated string of the first 20 email
addresses of the rooms in the AllRooms collection. This is because the
Office365.FindMeetingTimes operation is limited to searching for the available times of 20
person objects in a single operation.
c. The RoomTimeSuggestions collection uses the Office365.FindMeetingTimes operation to
retrieve the availabilities of the first 20 rooms in the AllRooms collection, based on the time
values from the _selectedMeetingTime variable. Note that & "Z" is used to properly format
the DateTime value.
d. The AvailableRooms collection is created. This is simply the RoomTimeSuggestions collection
of attendee availabilities with two additional columns added to it: "Address" and "Name".
"Address" is the email address of the room, and "Name" is the name of the room.
e. Then, the AvailableRoomsOptimal collection is created. This is just the AvailableRooms
collection with the "Availability" and "Attendee" columns removed. Doing this matches the
schemas of AvailableRoomsOptimal and AllRooms. This allows you to use both collections in
the Items property of RoomBrowseGallery.
f. _roomListSelected is set to false.
3. The loading state, _loadingRooms, is set to false once everything else has finished executing.

Back chevron

Property: Visible
Value: _roomListSelected && _showDetails

This control is visible only if both a room list has been selected and the Schedule tab is selected.
Property: OnSelect
Value: Set( _roomListSelected, false )

When _roomListSelected is set to false, it changes the RoomBrowseGallery control to display items
from the RoomsLists collection.
Send icon

Property: DisplayMode
Value: Logic to force user to input certain meeting details before the icon becomes editable.

If( Len( Trim( TextMeetingSubject1.Text ) ) > 0


&& !IsEmpty( MyPeople ) && !IsBlank( _selectedMeetingTime ),
DisplayMode.Edit, DisplayMode.Disabled
)

The icon is selectable only if the meeting subject is filled out, there is at least one attendee for the meeting,
and a meeting time has been selected. Otherwise, it's disabled.
Property: OnSelect
Value: Code to send the meeting invite to your selected attendees and clear all the input fields:

Set( _myCalendarName, LookUp( 'Office365'.CalendarGetTables().value, DisplayName = "Calendar" ).Name );


Set( _myScheduledMeeting,
'Office365'.V2CalendarPostItem( _myCalendarName,
TextMeetingSubject1.Text,
Text(DateAdd(DateTimeValue( _selectedMeetingTime.StartTime), -TimeZoneOffset(), Minutes) ),
Text(DateAdd(DateTimeValue( _selectedMeetingTime.EndTime), -TimeZoneOffset(), Minutes) ),
{
RequiredAttendees: Concat( MyPeople, UserPrincipalName & ";" ) & _selectedRoom.Address,
Body: TextMeetingMessage1.Text,
Location: _selectedRoom.Name,
Importance: "Normal",
ShowAs: "Busy",
ResponseRequested: true
}
)
);
Concurrent(
Reset( TextMeetingLocation1 ),
Reset( TextMeetingSubject1 ),
Reset( TextMeetingMessage1 ),
Clear( MyPeople ),
Set( _selectedMeetingTime, Blank() ),
Set( _selectedRoomList, Blank() ),
Set( _selectedRoom, Blank() ),
Set( _roomListSelected, false )
)

At a low level, this code block:


1. Sets _myCalendarName to the calendar in the Office365.CalendarGetTables() operation with a
DisplayName of "Calendar."
2. Schedules the meeting with all of the input values from the various selections the user made throughout
the screen using the Office365.V2CalendarPostItem operation.
3. Resets all of the input fields and variables used in creating the meeting.

NOTE
Depending on your region, the calendar you want might not have a display name of "Calendar." Go to Outlook to see what
the title of your calendar is, and make the appropriate change in the app.

Next steps
Learn more about this screen
Learn more about the Office 365 Outlook connector in PowerApps
Learn more about the Office 365 Users connector in PowerApps
Overview of the people-screen template for canvas
apps
1/23/2019 • 4 minutes to read • Edit Online

In a canvas app, add a people screen that lets users search for people within their organizations. Users can search
for, select, and add people to a collection. You can change which types of data appear in the search result gallery,
use your people selections to send an email, and make other customizations.
You can also add other template-based screens that show different data from Office 365, such as email, a user's
calendar, and availability of people users might want to invite to a meeting.
This overview teaches you:
How to use the default people screen.
How to modify the screen.
How to integrate the screen into apps.
For a deeper dive into this screen's default functionality, see the people-screen reference.

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Default functionality
To add a people screen from the template:
1. Sign in to PowerApps, and then create an app or open an existing app in PowerApps Studio.
This topic shows a phone app, but the same concepts apply to a tablet app.
2. On the Home tab of the ribbon, select New screen > People.
By default, the screen looks similar to this:
3. To start searching for users, select the text input box at the top and start typing a coworker's name. The
search results appear below the text input box:
4. When you select individuals from the search results, they are added to the MyPeople collection. The
search bar input value is reset, revealing the collection of people you've selected:
Modify the screen
You can modify the default functionality of this screen by showing different data for people.
If you want to modify the screen further, use the people-screen reference as a guide.
Show different data for people
This screen uses the Office365Users.SearchUser operation to search for users in your org. It provides additional
fields for each event beyond what appears in the UserBrowseGallery control. Adding or changing fields in the
gallery is a simple process:
1. In the UserBrowseGallery, select a label to modify (or add one and keep it selected).
2. With its Text property selected, in the formula bar, replace the contents with ThisItem.

IntelliSense shows a list of fields that you can select.


3. Select the field that you want.
The Text property should update to ThisItem.{FieldSelection} .

Integrate the screen into an app


The people screen is a powerful bundle of controls in its own right, but it usually performs best as part of a larger,
more versatile app. You can integrate this screen into a larger app in a number of ways, including using your
cached list of people.
Use your cached list of people
The people screen caches your people selections in the MyPeople collection. Should your business scenario call
for a person lookup, you will need to know how to use this collection. Here, you'll walk through how to connect
this screen to a rudimentary email screen and send emails to users in the MyPeople collection. You'll also gain
insight into how the email-screen works.
1. Add the Office 365 Outlook data source to your app by selecting the View tab, selecting Data sources >
Add data source, and looking for the Office 365 Outlook connector. You might have to select New
connection to find it.
2. After inserting the people screen, insert a new blank screen. Within that screen, add a back-arrow icon, two
text-input boxes, and a send icon.
3. Rename the screen to EmailScreen, the back-arrow icon to BackIcon, one text-input box to SubjectLine,
the other to MessageBody, and the send icon to SendIcon.
4. Set the OnSelect property of BackIcon to Back() .
5. Set the OnSelect property of SendIcon to this formula:

Office365.SendEmail(
Concat( MyPeople, UserPrincipalName & ";" ),
SubjectLine.Text,
MessageBody.Text
)

Here, you're using the Outlook connector to send an email. You pass it
Concat(MyPeople, UserPrincipalName & ";") as the list of recipients. This formula concatenates all of the
email addresses in the MyPeople collection into a single string with semicolons separating them. This is
no different from writing out a string of email addresses separated by semicolons in the "To" line of your
favorite email client.
You're passing SubjectLine.Text as the subject of the message, and MessageBody.Text as the body of
the message.
6. On the people screen, in the upper-right corner, insert the Mail icon. Change the icon color to whatever
suits you.
7. Set the OnSelect property of the SendIcon to Navigate( EmailScreen, None ) .
You now have a two-screen app in which you can select users, compose an email message to them, and
then send it. Feel free to test it out, but be careful, because the app sends emails to everyone you add to the
MyPeople collection.

Next steps
View the reference documentation for this screen.
Learn more about the Office 365 Outlook connector.
Learn more about the Office 365 Users connector.
Reference information about the people-screen
template for canvas apps
1/23/2019 • 2 minutes to read • Edit Online

For canvas apps in PowerApps, understand how each significant control in the people-screen template contributes
to the screen's overall default functionality. This deep dive presents behavior formulas and the values of other
properties that determine how the controls respond to user input. For a high-level discussion of this screen's
default functionality, see the people-screen overview.
This topic highlights some significant controls and explains the expressions or formulas to which various
properties (such as Items and OnSelect) of these controls are set:
Text search box
User-browse gallery (+ child controls)
People added gallery (+ child controls)

Prerequisite
Familiarity with how to add and configure screens and other controls as you create an app in PowerApps.

Text search box

A couple other controls interact or have a dependency on the text search box:
If a user starts typing any text, UserBrowseGallery becomes visible.
When a user selects a person within UserBrowseGallery, the search contents are reset.

User-browse gallery

Property: Items
Value: Logic to look up users when the user starts typing:

If( !IsBlank( Trim( TextSearchBox.Text ) ),


'Office365Users'.SearchUser(
{
searchTerm: Trim( TextSearchBox.Text ),
top: 15
}
)
)

The items of this gallery are populated by search results from the Office365.SearchUser operation. The operation
takes the text in Trim(TextSearchBox) as its search term and returns the top 15 results based on that search.
TextSearchBox is wrapped in a Trim() function because a user search on spaces is invalid.
The Office365Users.SearchUser operation is wrapped in an If(!IsBlank(Trim(TextSearchBox.Text)) ... ) function
because you only need to call the operation when the search box contains user-entered text. This improves
performance.
UserBrowseGallery Title control

Property: Text
Value: ThisItem.DisplayName
Displays the person's display name from their Office 365 profile.
Property: OnSelect
Value: Code to add the user to an app-level collection, and then select the user:

Concurrent(
Set( _selectedUser, ThisItem ),
Reset( TextSearchBox ),
If( Not( ThisItem.UserPrincipalName in MyPeople.UserPrincipalName ),
Collect( MyPeople, ThisItem )
)
)

Selecting this control does three things concurrently:


Sets the _selectedUser variable to the item selected.
Resets the search term in TextSearchBox.
Adds the selected item to the MyPeople collection, a collection of all the people the app user has selected.
UserBrowseGallery ProfileImage control
Property: Image
Value: Logic to retrieve a user's profile photo.

If( !IsBlank( ThisItem.Id ) &&


'Office365Users'.UserPhotoMetadata( ThisItem.Id ).HasPhoto,
'Office365Users'.UserPhoto( ThisItem.Id )
)

The Image control retrieves the user's image with the Office365Users.UserPhoto operation. However, before
doing that, it checks for two things:
Whether the ID field is empty or not empty. This prevents the Image control from trying to retrieve a user
photo before the gallery has been populated with search results.
Whether the user has a photo (with the Office365Users.UserPhotoMetadata operation). This prevents the
Office365Users.UserPhoto lookup from returning an exception if the user doesn't have a profile picture.

Note that if an image isn't retrieved, the Image control is blank, and the iconUser control is visible instead.

People-added gallery

Property: Items
Value: MyPeople
This is the collection of people initialized or added to by selecting the UserBrowseGallery Title control.
PeopleAddedGallery Title control

Property: OnSelect
Value: Set( _selectedUser, ThisItem )

Sets the _selectedUser variable to the item selected in EmailPeopleGallery.


PeopleAddedGallery iconRemove control

Property: OnSelect
Value: Remove( MyPeople, LookUp( MyPeople, UserPrincipalName = ThisItem.UserPrincipalName ) )

Looks up the record in the MyPeople collection, where UserPrincipalName matches the UserPrincipalName
of the selected item, and then removes that record from the collection.

Next steps
Learn more about this screen.
Learn more about the Office 365 Outlook connector.
Learn more about the Office 365 Users connector.
Show a list of items in PowerApps
3/29/2019 • 3 minutes to read • Edit Online

Show a list of items from any data source by adding a Gallery control to your canvas app. This topic uses Excel
as the data source. Filter the list by configuring the Gallery control to show only those items that match the filter
criterion in a Text input control.

Prerequisites
Learn how to add and configure a control in PowerApps.
Set up the sample data:
1. Download this Excel file, which contains sample data for this tutorial.
2. Upload the Excel file to a cloud-storage account, such as OneDrive for Business.
Open a blank app:
1. Sign in to PowerApps.
2. Under Make your own app, select Canvas app from blank.
3. Specify a name for your app, select Phone, and then select Create.
4. If the Welcome to PowerApps Studio dialog box appears, select Skip.
5. Add a connection to the FlooringEstimates table in the Excel file.

Add a gallery to a blank screen


1. On the Insert tab, select Gallery, and then select Vertical.

2. On the Properties tab of the right-hand pane, open the Items list, and then select Flooring Estimates.
3. (optional) In the Layout list, select a different option.

Add a gallery in a screen


1. On the Home tab, select New screen > List screen.
A screen that contains a Gallery control and other controls, such as a search bar, appears.
2. Set the gallery's Items property to FlooringEstimates .
The Gallery control shows the sample data.
Add a control to the Gallery control
Before you do any other customization, ensure that the layout for your Gallery control most closely matches
what you want. From there, you can further modify the Gallery template, which determines how all data in the
Gallery control appears.
1. Select the template by clicking or tapping near the bottom of the Gallery control and then selecting the
pencil icon in its upper-left corner.

2. With the template still selected, add a Label control, and then move and resize it so that it doesn't overlap
with other controls in the template.
3. Select the gallery, and then select Edit next to Fields on the Properties tab of the right-hand pane.
4. Select the label that you added earlier in this procedure, and then open the highlighted list in the Data
pane.

5. In that list, click or tap Price.


The Gallery control shows the new values.
Filter and sort a gallery
The Items property of a Gallery control determines which items it shows. In this procedure, you configure that
property so that it also determines which records appear based on filter criteria and in what order.

1. Set the Items property of the Gallery control to this formula:

Sort
(If
(IsBlank(TextSearchBox1.Text),
FlooringEstimates,
Filter(
FlooringEstimates,
TextSearchBox1.Text in Text(Name)
)
),
Name,
If(
SortDescending1,
SortOrder.Descending,
SortOrder.Ascending
)
)

For more information about the functions in this formula, see the formula reference.
2. Double-click the search box, and then type part or all of a product name in it.
Only those items that meet the filter criterion appear.
3. While pressing the Alt key, select the sort icon one or more times to switch the sort order.
The records toggle between ascending and descending alphabetical order based on the product name.

Highlight the selected item


Set the Gallery control's TemplateFill property to a formula that's similar to this example, but you can specify
different colors if you want:
If(ThisItem.IsSelected, LightCyan, White)

Change the default selection


Set the Gallery control's Default property to the record that you want to select by default. For example, you can
specify the fifth item in the FlooringEstimates data source:
Last(FirstN (FlooringEstimates, 5))
In this example, you specify the first item in the Hardwood category of the FlooringEstimates data source:
First(Filter(FlooringEstimates, Category = "Hardwood"))

Next steps
Learn how to work with forms and formulas.
Show items of different heights in a PowerApps
gallery
8/24/2018 • 2 minutes to read • Edit Online

If different items in your data set contain different amounts of data in the same field, you can completely show
items that contain more data without adding empty space after items that contain less data. Add and configure a
Flexible height gallery control so that you can:
Configure Label controls to expand or shrink based on their contents.
Position each control so that it automatically appears just under the control above it.
In this tutorial, you show data about flooring products in a Flexible height gallery control. The image of each
product appears 5 pixels below the overview, whether the overview contains five lines of text or two lines.

Suggested reading
If you've never added controls to a gallery, follow the steps in Show a list of items before you proceed in this topic.

Add data to a blank app


1. Download this Excel file, which contains names, overviews, and links to images of flooring products.

2. Upload the Excel file to a cloud-storage account such as OneDrive, Dropbox, or Google Drive.
3. In PowerApps Studio, click or tap New on the File menu.
4. On the Blank app tile, click or tap Phone layout.

5. Add a connection to the FlooringEstimates table in the Excel file.


For more information, see Add a connection.

Add data to a gallery


1. On the Insert tab, click or tap Gallery, and then click or tap Flexible height.

2. Resize the gallery to take up the entire screen.


3. Set the gallery's Items property to FlooringEstimates.

Show the product names


1. In the upper-left corner of the gallery, click or tap the pencil icon to select the gallery template.

2. With the gallery template selected, add a Label control to it.


3. Set the Text property of the Label control to this expression:
ThisItem.Name
Show the product overviews
1. With the gallery template selected, add another Label control, and move it below the first Label control.
2. Set the Text property of the second Label control to this expression:
ThisItem.Overview
3. With the second Label control selected, click or tap the name-tag icon on the Content tab, and rename the
control to OverviewText.

4. Set the AutoHeight property of the OverviewText box to true.


This step ensures that the box will grow or shrink to fit its contents.
Show the product images
1. Resize the template so that it's twice as tall as it was.
You can add controls to the template more easily as you build the app, and this change won't affect how the
app looks when it runs.
2. With the gallery template selected, add an Image control, and move it below the OverviewText box.
3. Ensure that the Image property of the Image control is set to this expression:
ThisItem.Image
4. Set the Y property of the Image control based on the position and the size of the OverviewText box, as in
this expression:
OverviewText.Y + OverviewText.Height + 5

Apply the same concept if you want to add more controls: set each control's Y property based on the Y and Height
properties of the control above it.

Next steps
Learn more about how to work with a gallery control and formulas.
Show, edit, or add a record in a canvas app
3/28/2019 • 2 minutes to read • Edit Online

In a canvas app, add and configure a Display form control to show all fields in a record, You can also add and
configure an Edit form control to edit any field in a record, add a record, and save your changes back to a data
source.

Prerequisites
Learn how to add and configure a control in PowerApps.
Download this Excel file, which contains sample data for this tutorial.
Upload the Excel file to a cloud-storage account, such as OneDrive for Business.
Create or open an app for phones, add a connection to the FlooringEstimates table in the Excel file.
You can add a form to a tablet app, but it won't match this topic because the form will have three columns
by default.
If you open an existing app, add a screen to it.

Add a form, and show data


1. On a blank screen, add a Drop down control, and name it ChooseProduct.

NOTE
If you're not sure how to add a control, rename it, or set a property, see Add and configure controls.

2. On the Properties tab of the right-hand pane, set Items to FlooringEstimates and Value to Name .

The list shows names of flooring products from the data source.
3. Add an Edit form control, move it below ChooseProduct, and then resize the form to cover most of the
screen.
NOTE
This topic describes the Edit form control, but similar principles apply to the Display form control.

4. Set the form's DataSource property to FlooringEstimates and its Item property to this formula:
First(Filter(FlooringEstimates, Name=ChooseProduct.Selected.Value))

This formula specifies that, after you finish configuring the form, it will show the record that the user
selects in ChooseProduct.
5. On the Properties tab of the right-hand pane, select Edit fields.

6. In the Fields pane, select Add field, select the check box for each field, and then select Add.
7. Select the ellipsis (...) next to Add field, select Collapse all, and then drag Name to the top of the list.

The Edit form control reflects your change.


Set the card type for a field
1. In the Fields pane, expand the Price field by selecting its down arrow.
2. Open the Control type list, and then select Edit slider.

In the form, the Price field shows a Slider control instead of a Text input control.
3. (optional) Follow the same process to change the control for the Overview field to an Edit multi-line
text control.

(Edit form only) Save changes


1. Rename the form EditForm.
2. Add a Button control, and set its OnSelect property to this formula:
SubmitForm(EditForm)

3. Press F5 to open Preview, change the name of a product, and then select the button that you created.
The SubmitForm function saves your changes to the data source.
4. (optional) Close Preview by pressing Esc (or by selecting the close icon in the upper-right corner).

Next steps
Learn more about working with forms and formulas.
Understand canvas-app forms in Microsoft
PowerApps
4/25/2019 • 20 minutes to read • Edit Online

Add three types of controls to a canvas app so that the user can browse for a record, display details about that
record, and edit or create a record:

ACTIVITY CONTROL DESCRIPTION

Browse for a record Gallery control Filter, sort, search, and scroll through
records in a data source, and select a
specific record. Display only a few fields
from each record to show several
records at a time, even on a small
screen.

Show details of a record Display form control For a single record, display many or all
fields in that record.

Edit or create a record Edit form control Update one or more fields in a single
record (or create a record starting with
default values), and save those
changes back to the underlying data
source.

Put each control on a different screen to make them easier to distinguish:

As this topic describes, combine these controls with formulas to create the overall user experience.

Prerequisites
Sign up for PowerApps, and then sign in by providing the same credentials that you used to sign up.
Learn how to configure a control in PowerApps.

Explore a generated app


PowerApps can automatically generate an app based on a data source that you specify. Each app contains three
screens with the controls described earlier and formulas that connect them. Run these apps "out of the box,"
customize them for your specific goals, or examine how they work so that you can learn useful concepts that
apply to your own apps. In the following sections, inspect the screens, controls, and formulas that drive a
generated app.
Browse screen

This screen features these key formulas:

CONTROL SUPPORTED BEHAVIOR FORMULA

BrowseGallery1 Display records from the Assets data The Items property of the gallery is
source. set to a formula that's based on the
Assets data source.

ImageNewItem1 Display the Edit and Create screen The OnSelect property of the image is
with each field set to a default value, set to this formula:
so that the user can easily create a NewForm( EditForm1 );
record. Navigate( EditScreen1, None )

NextArrow1 (in the gallery) Display the Details screen to view The OnSelect property of the arrow is
many or all fields of the currently set to this formula:
selected record. Navigate( DetailScreen1, None )
The primary control on this screen, BrowseGallery1, covers most of the area of the screen. The user can scroll
through the gallery to find a specific record to display more fields or to update.
Set the Items property of a gallery to show records from a data source in it. For example, set that property to
Assets to show records from a data source of that name.

NOTE
In a generated app, Items is set to a significantly more complicated formula by default so that the user can sort and
search for records. You'll learn how to build that formula later in this topic; the simpler version is enough for now.

Instead of finding a record to display or edit, the user can create a record by selecting the "+" symbol above the
gallery. Create this effect by adding an Image control, showing a "+" symbol in it, and setting its OnSelect
property to this formula:
NewForm ( EditForm1 ); Navigate( EditScreen1, None )
This formula opens the Edit and Create screen, which features an Edit form control named EditForm1. The
formula also switches that form into New mode, in which the form shows default values from the data source
so that the user can easily create a record from scratch.
To examine any control that appears in BrowseGallery1, select that control in the first section of that gallery,
which serves as a template for all other sections. For example, select the middle Label control on the left edge:

In this example, the control's Text property is set to ThisItem.AssignedTo, which is a field in the Assets data
source. The Text property of the other three Label controls in the gallery are set to similar formulas, and each
control shows a different field in the data source.
Select the Shape control (the arrow ), and confirm that its OnSelect property is set to this formula:
Navigate( DetailScreen1, None )
If the user finds a record in BrowseGallery1, the user can select the arrow for that record to show more
information about it in DetailScreen1. By selecting an arrow, the user changes the value of the Selected
property of BrowseGallery1. In this app, that property determines which record appears in not only
DetailScreen1 but also, if the user decides to update the record, the Edit and Create screen.
Detail screen

This screen features these key formulas:

CONTROL SUPPORTED BEHAVIOR FORMULA

DetailForm1 Displays a record in the Assets data Set the DataSource property to
source Assets.

DetailForm1 Determines which record to display. In Set the Item property of this control
a generated app, displays the record to this value:
that the user selected in the gallery. BrowseGallery1.Selected

Card controls In a Display form control, displays a Set the DataField property to the
single field in a record. name of a field, enclosed in double
quotation marks (for example,
"Name").

ImageBackArrow1 When the user selects this control, Set the OnSelect property to this
opens BrowseScreen1. formula:
Back()

ImageDelete1 When the user selects this control, Set the OnSelect property to this
deletes a record. formula:
Remove( Assets,
BrowseGallery1.Selected )

ImageEdit1 When the user selects this control, Set the OnSelect property to this
opens the Edit and Create screen to formula:
the current record. Navigate( EditScreen1, None )

At the top of the screen, three images sit outside of DetailForm1 and act as buttons, orchestrating between the
three screens of the app.
DetailForm1 dominates this screen and displays the record that the user selected in the gallery (because the
form's Item property is set to BrowseGallery1.Selected). The DataSource property of the form also
provides metadata about the data source, such as a user-friendly display name for each field.
DetailForm1 contains several Card controls. You can select either the Card control itself or the control that it
contains to discover additional information.

The DataField property of a Card control determines which field the card displays. In this case, that property is
set to AssetID. The card contains a Label control for which the Text property is set to Parent.Default. This
control shows the Default value for the card, which is set through the DataField property.
In a generated app, Card controls are locked by default. When a card is locked, you can't modify some
properties, such as DataField, and the formula bar is unavailable for those properties. This restriction helps
ensure that your customizations don't break the basic functionality of the generated app. However, you can
change some properties of a card and its controls in the right-hand pane:
In the right-hand pane, you can select which fields to display and in which kind of control each field displays.
Edit/Create screen

This screen features these key formulas:


CONTROL SUPPORTED BEHAVIOR FORMULA

EditForm1 Displays a record in the Assets data Set the DataSource property to
source. Assets.

EditForm1 Determines which record to display. In Set the Item property to this value:
a generated app, displays the record BrowseGallery1.Selected
that the user selected in
BrowseScreen1.

Card controls In a Edit form control, provides Set the DataField property to the
controls so that the user can edit one name of a field, enclosed in double
or more fields in a record. quotation marks (for example,
"Name").

ImageCancel1 When the user selects this control, Set the OnSelect property to this
discards any changes in progress, and formula:
opens the Details screen. ResetForm( EditForm1 ); Back()

ImageAccept1 When the user selects this control, Set the OnSelect property to this
submits changes to the data source. formula:
SubmitForm( EditForm1 )

EditForm1 If changes are accepted, returns to the Set the OnSuccess property to this
previous screen. formula:
Back()

EditForm1 If changes aren't accepted, remain on Leave the OnFailure property blank.
the current screen so that the user can
fix any issues and try to submit again.

LblFormError1 If changes aren't accepted, shows an Set the Text property to this value:
error message. EditForm1.Error

As in the Details screen, a form control, named EditForm1, dominates the Edit and Create screen. In
addition, the Item property of EditForm1 is set to BrowseGallery1.Selected, so the form displays the record
that the user selected in BrowseScreen1. While the Details screen shows each field as read-only, the user can
update the value of one or more fields by using the controls in EditForm1. It also uses the DataSource
property to access metadata about this data source, such as the user-friendly display name for each field and
the location where changes should be saved.
If the user selects the "X" icon to cancel an update, the ResetForm function discards any unsaved changes, and
the Back function opens the Details screen. Both the Details screen and the Edit and Create screen show the
same record until the user selects a different one on BrowseScreen1. The fields in that record remain set to the
values that were most recently saved, not any changes that the user made and then abandoned.
If the user changes one or more values in the form and then selects the "checkmark" icon, the SubmitForm
function sends the user's changes to the data source.
If the changes are successfully saved, the form's OnSuccess formula runs, and the Back() function opens
the detail screen to show the updated record.
If the changes aren't successfully saved, the form's OnFailure formula runs, but it doesn't change anything
because it's blank. The Edit and Create screen remains open so that the user can either cancel the changes
or fix the error. LblFormError1 shows a user-friendly error message, to which the form's Error property is
set.
As with a Display form control, an Edit form control contains Card controls, which contain other controls that
show different fields in a record:

In the previous image, the selected card shows the AssetID field and contains a Text input control so that the
user can edit the value of that field. (In contrast, the detail screen shows the same field in a Label control, which
is read-only.) The Text input control has a Default property, which is set to Parent.Default. If the user were
creating a record instead of editing one, that control would show an initial value that the user can change for
the new record.
In the right-hand pane, you can show or hide each card, rearrange them, or configure them to show fields in
different types of controls.
Build an app from scratch
By understanding how PowerApps generates an app, you can build one yourself that uses the same building
blocks and formulas discussed earlier in this topic.

Identify test data


To get the most from this topic, start with a data source with which you can experiment. It should contain test
data that you can read and update without concern.

NOTE
If you use a SharePoint list or an Excel table that contains column names with spaces as your data source, PowerApps will
replace the spaces with "_x0020_". For example, "Column Name" in SharePoint or Excel will appear as
"Column_x0020_Name" in PowerApps when displayed in the data layout or used in a formula.

To follow the rest of this topic exactly, create a SharePoint list named "Ice Cream" that contains this data:
Create an app from blank, for phones, and connect it to your data source.

NOTE
Tablet apps are very similar, but you may want a different screen layout to make the most of the extra screen
space.

The examples in the rest of the topic are based on a data source named Ice Cream.

Browse records
Get a quick piece of information from a record by finding it in a gallery on a browse screen.
1. Add a Vertical gallery, and change the layout to Title only.
2. Set the gallery's Items property to Ice Cream.
3. Set the Text property of the first label in the gallery to ThisItem.Title if it's set to something else.
The label now shows the value in the Title field for each record.
4. Resize the gallery to fill the screen, and set its TemplateSize property to 60.
The screen resembles this example, which shows all records in the data source:
View details
If the gallery doesn't show the information that you want, select the arrow for a record to open the details
screen. A Display form control on that screen shows more, possibly all, fields for the record that you selected.
The Display form control uses two properties to display the record:
DataSource property. The name of the data source that holds the record. This property populates the right-
hand panel with fields and determines the display name and data type (string, number, date, etc.) of each
field.
Item property. The record to display. This property is often connected to the Selected property of the
Gallery control so that the user can select a record in the Gallery control and then drill into that record.
When the DataSource property is set, you can add and remove fields through the right-hand pane and change
how they're displayed.
On this screen, users can't intentionally or accidentally change any values of the record. The Display form
control is a read-only control, so it won't modify a record.
To add a Display form control:
1. Add a screen, and then add a Display form control to it
2. Set the DataSource property of the form control to 'Ice Cream'.
In the right-hand pane, you can select the fields to display on your screen and which type of card to display for
each field. As you make changes in the right-hand pane, the DataField property on each Card control is set to
the field that the user will interact with. Your screen should resemble this example:

Finally, we need to connect the Display form control to the Gallery control so that we can look at details for a
specific record. As soon as we complete setting the Item property, the first record from the gallery will appear
in our form.
Set the Item property of the Display form control to Gallery1.Selected.
The details for the selected item appear in the form.
Great! We now turn to navigation: how a user opens the details screen from the gallery screen and opens the
gallery screen from the details screen.
Add a Button control to the screen, set its Text property to show Back, and set its OnSelect property
to Back().
This formula returns the user back to the gallery when they finish viewing details.

Now, let's return to the Gallery control and add some navigation to our detail screen.
1. Switch to the first screen, which is hosting our Gallery control, and select the arrow in the first item in
the gallery.
2. Set the OnSelect property of the shape to this formula:
Navigate( Screen2, None )

3. Press F5, and then select an arrow in the gallery to show the details for an item.
4. Select the Back button to return to the gallery of products, and then press Esc.

Editing details
Finally, our last core activity is changing the contents of a record, which users accomplish in an Edit form
control.
The Edit form control uses two properties to display and edit the record:
DataSource property. The name of the data source that holds the record. Just as with the Display form
control, this property populates the right-hand panel with fields and determines the display name and data
type (string, number, date, etc.) for each field. This property also determines whether each field's value is
valid before submitting it to the underlying data source.
Item property. The record to edit, which is often connected to the Selected property of the Gallery control.
That way, you can select a record in the Gallery control, show it in the details screen, and edit it in the Edit
and Create screen.
To add an Edit form control:
1. Add a screen, add an Edit form control, and then set the form's DataSource property to 'Ice Cream'.
2. Set the Item property to Gallery1.Selected.
You can now select the fields to display on your screen. You can also select which type of card to display for
each field. As you make changes in the right-hand pane, the DataField property on each Card control is set to
the field your user will interact with. Your screen should resemble this example:

These two properties are the same as the properties on the Display form control. And with these alone, we
can display the details of a record.
The Edit form control goes further by offering the SubmitForm function to write back changes to the data
source. You use this with a button or image control to save a user's changes.
Add a Button control, set its Text property to show Save, and set its OnSelect property to this formula:
SubmitForm ( Form1 )
To add navigation to and from this screen:
1. Add another Button control, set its Text property to show Cancel, and set its OnSelect property to this
formula:
ResetForm ( Form1 ); Back()
This formula discards any unsaved edits and opens the previous screen.

2. Set the OnSuccess property of the form to Back().


When updates are successfully saved, the previous screen (in this case, the details screen) opens
automatically.

3. On the Display screen, add a button, set its Text property to show Edit, and set its OnSelect property
to this formula:
Navigate( Screen3, None )

You've built a basic app with three screens for viewing and entering data. To try it out, show the gallery screen,
and then press F5 (or select the forward arrow "Preview" button near the upper-left corner of the screen). The
pink dot indicates where the user clicks or taps the screen at each step.
Create a record
The user interacts with the same Edit form to both update and create records. When the user wants to create a
record, the NewForm function switches the form to New mode.
When the form is in New mode, the value of each field is set to the defaults of the data source. The record
that's provided to the form's Item property is ignored.
When the user is ready to save the new record, SubmitForm runs. After the form is successfully submitted, the
form is switched back to EditMode.
On the first screen, you'll add a New button:
1. On the screen with the gallery, add a Button control.
2. Set the button's Text property to New and its OnSelect property to this formula:
NewForm ( Form1 ); Navigate( Screen3, None )
This formula switches the Edit form control on Screen3 to New mode and opens that screen so that
the user can fill it in.
When the Edit and Create screen opens, the form is empty, ready for the user to add an item. When the user
selects the Save button, the SubmitForm function ensures that a record is created instead of being updated. If
the user selects the Cancel button, the ResetForm function switches the form back to Edit mode, and the
Back function opens the screen for browsing the gallery.

Delete a record
1. On the Display screen, add a button, and set its Text property to show Delete..
2. Set the button's OnSelect property to this formula:
Remove( 'Ice Cream', Gallery1.Selected ); Back()
Handling errors
In this app, an error occurs when the value of a field is not valid, a required field is blank, you're disconnected
from the network, or any number of other problems pop up.
If SubmitForm fails for any reason, the Error property of the Edit form control contains an error message to
show the user. With this information, the user should be able to correct the issue and resubmit the change, or
they can cancel the update.
1. On the Edit and Create screen, add a Label control, and move it just below the Save button. Any error
will be easy to see after the user selects this control to save changes.
2. Set the Text property of the Label control to show Form1.Error.
In an app that PowerApps generates from data, the AutoHeight property on this control is set to true so that
no space is consumed if no error occurs. The Height and Y properties of the Edit form control are also
adjusted dynamically to account for this control growing when an error occurs. For more details, generate an
app from existing data, and inspect these properties. The text-box control for errors is very short when no error
has occurred, you may need to open the Advanced view (available on the View tab) to select this control.
Refresh data
The data source is refreshed whenever the user opens the app, but the user might want to refresh the records in
the gallery without closing the app. Add a Refresh button so that the user can select it to manually refresh the
data:
1. On the screen with the Gallery control, add a Button control and set its Text property to show Refresh.
2. Set the OnSelect property of this control to this formula:
Refresh( 'Ice Cream' )
Search and sort the gallery
In the app that PowerApps generated from data, we neglected to discuss two controls at the top of the Browse
screen. By using these controls, the user can search for one or more records, sort the list of records in
ascending or descending order, or both.

When the user selects the sort button, the sort order of the gallery reverses. To create this behavior, we use a
context variable to track the direction in which the gallery is sorted. When the user selects the button, the
variable is updated, and the direction reverses. The OnSelect property of the sort button is set to this formula:
UpdateContext( {SortDescending1: !SortDescending1} )
The UpdateContext function creates the SortDescending1 context variable if it doesn't already exist. The
function will read the value of the variable and set it to the logical opposite by using the ! operator. If the value
is true, it becomes false. If the value is false, it becomes true.
The formula for the Items property of the Gallery control uses this context variable, along with the text in the
TextSearchBox1 control:

Sort(
If( IsBlank(TextSearchBox1.Text),
Assets,
Filter( Assets, TextSearchBox1.Text in Text(ApproverEmail) )
),
ApproverEmail,
If(SortDescending1, Descending, Ascending)
)

Let's break this down:


On the outside, we have the Sort function, which takes three arguments: a table, a field on which to sort,
and the direction in which to sort.
The sort direction is taken from the context variable that toggles when the user selects the
ImageSortUpDown1 control. The true/false value is translated to the constants Descending and
Ascending.
The field to sort on is fixed to ApproverEmail. If you change the fields that appear in the gallery,
you'll need to change this argument too.
On the inside, we have the Filter function, which takes a table as an argument and an expression to
evaluate for each record.
The table is the raw Assets data source, which is the starting point before filtering or sorting.
The expression searches for an instance of the string in TextSearchBox1 within the ApproverEmail
field. Again, if you change the fields that appear in the gallery, you'll also need to update this
argument.
If TextSearchBox1 is empty, the user wants to show all records, and the Filter function is bypassed.
This is but one example; you can craft your own formula for the Items property, depending on the needs of
your app, by composing Filter, Sort, and other functions and operators together.

Screen design
So far, we haven't discussed other ways to distribute controls across screens. That's because you have many
options, and the best selection depends on your specific app's needs.
Because real estate on phone screens is so limited, you probably want to browse, display, and edit/create on
different screens. In this topic, the Navigate and Back functions open each screen.
On a tablet, you can browse, display, and edit/create on two or even one screen. For the latter, no Navigate or
Back function would be required.
If the user is working on the same screen, you need to be careful that the user can't change the selection in the
Gallery and potentially lose edits in the Edit form control. To keep the user from selecting a different record
when changes to another record haven't been saved yet, set the Disabled property of the gallery to this
formula:
EditForm.Unsaved
Understand data-form layout for canvas apps in
PowerApps
3/22/2019 • 14 minutes to read • Edit Online

Easily create an attractive and efficient form when you build a canvas app in PowerApps. For example, consider
this basic form for recording sales orders:

In this tutorial, we'll walk through the steps to create this form. We'll also look at some advanced topics, such as
dynamic sizing of fields to fill available space.

Before you start


If you're new to PowerApps (or have only generated apps automatically), you'll want to build an app from scratch
before you dive into this topic. By building an app from scratch, you'll become familiar with required concepts,
such as adding data sources and controls, that are mentioned but not explained in this topic.
This topic is written as though you have a data source that's named Sales order and that contains the fields in the
previous graphic. If you have a PowerApps Plan 2 license or a trial license and system administrator or system
customizer permissions, you can create an entity in Common Data Service and add similar fields.

Add a gallery
1. Create a tablet app from scratch, and add your data source.
Everything discussed in this topic also applies to phone layouts, but phone apps often have only one
vertical column.
2. Add a vertical Gallery control, and set its Items property to 'Sales order'.
(optional) To match the examples in this tutorial, change the gallery's Layout to show only Title and
subtitle.
3. In the gallery, click or tap SO004.

This record will appear in the form that you build by following steps later in this topic.

Add a title bar


1. Add a blank screen where you'll put the form.
Outside of this tutorial, you can put the Gallery and Edit form controls on the same screen, but you'll have
more room to work with if you put them on separate screens.
2. At the top of the new screen, add a Label control, and set its Text property to this expression:
"Sales Order " & Gallery1.Selected.SalesOrderId
The label shows the sales-order number of the record that you selected in the gallery.
3. (optional) Format the label as follows:
a. Set its Align property to Center.
b. Set its Size property to 20.
c. Set its Fill property to Navy.
d. Set its Color property to White.
e. Set its Width property to Parent.Width.
f. Set its X and Y properties to 0.

Add a form
1. Add an Edit form control, and then move and resize it to fill the screen under the label.
In the next step, you'll connect the form control to the Sales order data source by using the right-hand
pane, not the formula bar. If you use the formula bar, the form won't show any fields by default. You can
always show any fields that you want by selecting one or more check boxes in the right-hand pane.
2. In the right-hand pane, click or tap the down arrow next to No data source selected, and then click or tap
Sales order.
A default set of fields from the Sales order data source will appear in a simple, three-column layout.
However, many are blank, and they may take a few moments to settle into their final positions.
3. Set the form's Item property to Gallery1.Selected.
The form shows the record that you selected in the gallery, but the default set of fields might not match
what you want in your final product.
4. In the right-hand pane, hide each of these fields by clearing its checkbox:
Sales order ID
Account
Sales person
Account contact
5. Move the Order status field by dragging it to the left and then dropping it on the other side of the
Customer purchase order reference field.
Your screen should resemble this example:

Select a data card


Each field displayed has a corresponding data card on the form. This card comprises a set of controls for the field
title, an input box, a star (which appears if the field is required), and a validation error message.
You can also select cards directly on the form. When a card is selected, a black caption appears above it.
NOTE
To delete a card (not just hide it), select it, and then press Delete.

Arrange cards in columns


By default, forms in tablet apps have three columns, and those in phone apps have one. You can specify not only
how many columns a form has but also whether all cards should fit within column borders.
In this graphic, the number of columns in the form was changed from three to four with the Snap to columns
check box selected. The cards in the form were arranged automatically to fit the new layout.

Resize cards across multiple columns


Depending on the data in each card, you might want some cards to fit in a single column and other cards to span
multiple columns. If a card contains more data than you want to show in a single column, you can widen the card
by selecting it and then dragging the grab handle on the left or right border of its selection box. As you drag the
handle, the card will "snap" to column boundaries.
To make your design more flexible but retain some structure, you can increase the number of columns to 12. With
that change, you can easily configure each card to span the entire form, half of the form, one-third, one-quarter,
one-sixth, and so forth. Let's see this in action.
1. In the right-hand pane, set the number of columns in the form to 12.

The form doesn't visibly change, but you have more snap points as you drag the left or right grab handle.
2. Increase the width of the Order date card by dragging the grab handle on the right one snap point to the
right.
The card spans four of the form's 12 columns (or 1/3 of the form), instead of only three of the form's 12
columns (or 1/4 of the form). Whenever you increase a card's width by one snap point, the card spans an
additional 1/12 of the form.

3. Repeat the previous step with the Order status and Customer purchase order reference cards.

4. Resize the Name and Description cards to take up six columns (or 1/2) of the form.
5. Make the first two lines of the delivery address stretch entirely across the form:
All done. We have our desired form, mixing rows with different numbers of columns:

Manipulate controls in a card


The delivery address comprises several pieces of information that we want to visually group together for the user.
Each field will remain in its own data card, but we can manipulate the controls within the card to make them fit
better together.
1. Select the First line of Delivery address card, select the label within that card, and then delete the first
three words from the text.
2. Select the Second line of Delivery address card, select the label within that card, and then delete all of
the text in it.
It may be tempting to simply remove the label control and, in many cases, that will work fine. But formulas
might depend on that control being present. The safer approach is to remove the text or to set the Visible
property of the control to false.

3. In the same card, move the text input box over the label to reduce the space between the first and second
lines of the address.
The height of the card shrinks when its contents take up less space.

Now let's turn our attention to the third line of the address. Similar to what we just did, let's shorten the text of
each label for these cards and arrange the Text input box to be to the right of each label. Here are the steps for the
State card:

STEP DESCRIPTION RESULT

1 Select the State card so that grab


handles appear around it.
STEP DESCRIPTION RESULT

2 Select the label within this card so that


grab handles appear around it.

3 Place the cursor to the right of the text,


and then delete the portion that we
don't need.

4 Using the grab handles on the sides,


size the label control to fit the new text
size.

5 Select the text input control within this


card.

6 Using the grab handles on the sides,


size the text input control to the size
that you want.

7 Drag the text input box up and to the


right of the label control, and then drop
the text input box.

Our modifications to the State card are


now complete.

The result for the complete third address line:


Note that many of the cards start out with dynamic formulas for their properties. For example, the Text input
control that we resized and moved above had a Width property based on the width of its parent. When you move
or resize a control, these dynamic formulas are replaced with static values. If you want, you can restore the
dynamic formulas by using the formula bar.

Turning off Snap to columns


Sometimes you'll want finer control than the standard 12 columns can provide. For these cases, you can turn off
Snap to columns and then position cards manually. The form will continue snapping to 12 columns, but you can
also hold down the Alt key to manually position and size a card as you wish.
In our example, the four components that make up the third line of the address all have exactly the same width.
But this may not be the best layout, as city names are longer than state abbreviations, and the Text input box for
countries/regions is short due to the length of its label.
To optimize this space, turn off Snap to columns in the right-hand pane and then hold down the Alt key while
sizing and positioning these cards. Whenever you hold down the Alt key, all controls show black captions. This
behavior is by design to show you control names.

After careful positioning, the result has appropriate sizes for each field and even spacing horizontally between
fields:

In summary, what are the differences when Snap to columns is on versus off?

BEHAVIOR SNAP TO COLUMNS ON SNAP TO COLUMNS OFF

Resize snaps to Number of columns you select: 12 columns


1, 2, 3, 4, 6, or 12

Resize snap can be overriden No Yes, with Alt key

Cards automatically re-layout between Yes No


rows (more on this later)
Set width and height
As with everything in PowerApps, the form's layout is governed by properties on the card controls. As already
described, you can change the values of these properties by dragging controls to different locations or dragging
grab handles to resize controls. But you'll discover situations in which you'll want to understand and manipulate
these properties more precisely, especially when making your forms dynamic with formulas.
Basic Layout: X, Y, and Width
The X and Y properties control the position of cards. When we work with controls on the raw canvas, these
properties provide an absolute position. In a form, these properties have a different meaning:
X: Order within a row.
Y: Row number.
Similar to controls on the canvas, the Width property specifies the minimum width of the card (more on the
minimum aspect in a moment).
Let's take a look at the X, Y, and Width properties of the cards in our form:

Overflowing rows
What happens if the cards on a row are too wide to fit on that row? Normally you don't need to worry about this
possibility. With Snap to columns on, these three properties will automatically be adjusted so that everything fits
nicely within rows without overflowing.
But with Snap to columns turned off or a formula-based Width on one or more of your cards, overflowing a
row can happen. In this case, the cards will automatically wrap so that, effectively, another row is created. For
example, let's manually change the Width property of our Customer purchase order reference card (first row,
third item) to 500:
The three cards on the top row no longer fit horizontally, and another row has been created to wrap the overflow.
The Y coordinate for all these cards is still the same at 0, and the Name and Description cards still have a Y of 1.
Cards that have different Y values aren't merged across rows.
You can use this behavior to create a fully dynamic layout, where cards are placed based on a Z -order, filling across
as much as possible before moving to the next row. To achieve this effect, give all the cards the same Y value, and
use X for the order of the cards.
Filling spaces: WidthFit
The overflow in the last example created a space after the Order status card, which was the second card in the
first row. We could manually adjust the Width properties of the two remaining cards to fill this space, but this
approach is tedious.
As an alternative, use the WidthFit property. If this property is set to true for one or more cards in a row, any
remaining space on the row will be evenly divided between them. This behavior is why we said earlier that the
Width property of a card is a minimum, and what is actually seen can be wider. This property will never cause a
card to shrink, only expand.
If we set WidthFit to true on the Order status card, it fills the available space, while the first card remains
unchanged:

If we also set WidthFit to true on the Order date card, both cards will evenly split the available space:
Note that grab handles on these cards take into account the extra width provided by WidthFit, not the minimum
width provided by the Width property. It can be confusing to manipulate the Width property while WidthFit is
turned on; you may want to turn it off, make changes to Width, and then turn it back on.
When might WidthFit be useful? If you have a field that is used only in certain situations, you can set its Visible
property to false, and the other cards on the row will automatically fill the space around it. You might want to use
a formula that shows a field only when another field has a particular value.
Here, we'll set the Visible property of the Order status field to a static false:

With the second card effectively removed, the third card can now return to the same row as the first card. The first
card still has WidthFit set to true, so it alone expands to fill the available space.
Because Order status is invisible, you can't select it as easily on the canvas. However, you can select any control,
visible or not, in the hierarchical list of controls on the left side of the screen.
Height
The Height property governs the height of each card. Cards have the equivalent of WidthFit for Height, and it's
always set to true. Imagine that a HeightFit property exists, but don't look for it in the product because such a
property isn't yet exposed.
You can't turn off this behavior, so changing the heights of cards can be challenging. All cards within a row appear
to be the same height as the tallest card. You might look at a row like this:
Which card is making the row tall? In the previous graphic, the Total amount card is selected and appears tall, but
its Height property is set to 80 (same as the height of the first row ). To reduce the height of a row, you must
reduce the Height of the tallest card in that row, and you can't identify the tallest card without reviewing the
Height property of each card.
AutoHeight
A card might also be taller than you expect if it contains a control for which the AutoHeight property is set to
true. For example, many cards contain a label that displays an error message if the field's value causes a validation
problem.
Without any text to display (no error), the label collapses to zero height. If you didn't know any better, you wouldn't
know it was there, and that's as it should be:

On the left side of the screen, the list of controls shows ErrorMessage1, which is our label control. As you update
an app, you can select this control to give it some height and show grab handles with which you can position and
size the control. The "A" in a blue box indicates that the control has AutoHeight set to true:
The Text property of this control is set to Parent.Error, which is used to obtain dynamic error information based
on validation rules. For illustration purposes, let's statically set the Text property of this control, which will increase
its height (and, by extension, the height of the card) to accommodate the length of the text:

Let's make the error message a little longer, and again the control and the card grow to accommodate. Note that
the row overall grows in height, retaining vertical alignment between the cards:
Understand data cards in PowerApps
5/26/2019 • 8 minutes to read • Edit Online

Card controls are the building blocks of the Edit form and Display form controls in canvas apps. The form
represents the entire record, and each card represents a single field of that record.
You can interact with cards most easily in the right-hand pane after you select a form control in the design
workspace. In that pane, you can choose which fields to show, how to show each field, and in what order to show
them. This example shows an Edit form control in an app built from a SharePoint list that's named Assets.

To get started with cards, see add a form and understand data forms. The remainder of this topic goes into more
detail about how cards work and how you can customize or even create your own.

Predefined cards
PowerApps offers a predefined set of cards for strings, numbers, and other data types. In the right-hand pane, you
can see the variations available and change the card used for a field:
In this example, a single-line text card is selected, but the URL's text is longer than can be shown on a single line.
Let's change this to a multi-line text card to give our users more room to edit:

Several fields of this data source aren't being shown, but you can show or hide a field by selecting its checkbox.
This example illustrates how to show the SecurityCode field.

Customize a card
Cards comprise other controls. In an Edit form control, the user enters data in a standard Text input control that
you add from the Insert tab.
Let's walk through an example of how to change a card's appearance by manipulating controls in it.
1. First, let's return to the card that we inserted most recently, for the SecurityCode field. Select this card by
clicking or tapping it once:

2. Select the Text input control inside the card by clicking or tapping the input control itself.

3. Move this control within the card by dragging the selection box, and resize the control by dragging the
handles along the edge of the selection box:

You can resize, move, and make other modifications to controls within a card, but you can't delete it without
unlocking it first.

Unlock a card
In addition to containing controls, cards themselves are controls that have properties and formulas just like any
other control. When you choose to display a field on a form, the right-hand pane automatically creates the card for
you and generates the needed formulas. We can see these formulas in the Advanced tab of the right-hand pane:
We immediately see one of the most important properties of the card: the DataField property. This property
indicates which field of the data source the user sees and can edit in this card.
On the Advanced tab, the banner at the top indicates that the properties of this card are locked. A lock icon also
appears next to the DataField, DisplayName, and Required properties. The right-hand pane created these
formulas, and the lock prevents accidental changes to these properties.

Click or tap the banner at the top to unlock the card so that you can modify these properties:
Let's modify the DisplayName to put a space between Asset and ID. By making this change, we're altering what
was generated for us. In the right-hand pane, this card has a different label:

We've now taken control over this card and can modify it further to fit our need. But we've lost the ability to
change the card from one representation to another (for example, single-line text to multi-line text) as we did
before. We've transformed the predefined card into a "custom card" that we now control.

IMPORTANT
You can't relock a card if you unlock it. To get a card back to a locked state, remove it, and reinsert it in the right-hand pane.

You can change the appearance and behavior of an unlocked card in a variety of ways, such as adding and deleting
controls within it. For example, you can add a star shape from the Icons menu on the Insert tab.
The star is now a part of the card and will travel with it if, for example, you reorder the cards within the form.
As another example, unlock the ImageURL card, and then add an Image control to it from the Insert tab:

In the formula bar, set the Image property of this control to TextBox.Text, where TextBox is the name of the Text
input control that holds the URL:
And now we can see the images and edit their URLs. Note that we could have used Parent.Default as the Image
property, but it wouldn't have updated if the user changed the URL.
We can do the same thing on the second screen of this app, where we use a Display form control to display the
details of a record. In this case, we may want to hide the label (set the Visible property of the label, not the card, to
false) because the user won't edit the URL on that screen:
Interact with a form
After you unlock a card, you can change how it interacts with the form that contains it.
Below are some guidelines for how controls should work with their card and how the cards should work with the
form. These are only guidelines. As with any control in PowerApps, you can create formulas that reference any
other control in PowerApps, and that's no less true for cards and controls within cards. Be creative: you can create
an app in many ways.
DataField property
The most important property on the card is the DataField property. This property drives validation, what field is
updated, and other aspects of the card.
Information flowing in
As a container, the form makes ThisItem available to all cards within it. This record contains all of the fields for the
current record of interest.
The Default property of every card should be set to ThisItem.FieldName. Under certain circumstances, you
might want to transform this value on the way in. For example, you might want to format a string or translate the
value from one language to another.
Each control within the card should reference Parent.Default to get at the field's value. This strategy provides a
level of encapsulation for the card so that the card's Default property can change without changing the internal
formulas of the card.
By default, DefaultValue and Required properties are taken from the data source's metadata based on the
DataField property. You can override these formulas with your own logic, integrating the data source's metadata
by using the DataSourceInfo function.
Information flowing out
After the user modifies a record by using controls in the cards, the SubmitForm function saves those changes to
the data source. When that function runs, the form control reads the values of each card's DataField property to
know what field to change.
The form control also reads the value of each card's Update property. This value will be stored in the data source
for this field. This is the place to apply another transform, perhaps to reverse the transform that was applied in the
card's Default formula.
The Valid property is driven from the metadata of the data source, based on the DataField property. It's also
based on the Required property and whether the Update property contains a value. If the value on the Update
property isn't valid, the Error property provides a user-friendly error message.
If the DataField property of a card is blank, the card is just a container of controls. Its Valid and Update
properties don't participate when the form is submitted.

Dissecting an example
Let's look at the controls that make up a basic data-entry card. The space between controls has been increased to
show each more clearly:
In this graphic, the controls within the data card have been labeled:

Four controls make this card work:

NAME TYPE DESCRIPTION

TextRequiredStar Label control Displays a star, which is commonly used


on data-entry forms to indicate that a
field is required.

TextFieldDisplayName Label control Displays the user-friendly name of this


field. This name can differ from what is
in the data source's schema.

InputText Input text control Displays the initial value of the field and
allows the user to change that value.

TextErrorMessage Label control Displays a user-friendly error message


to the user if a problem occurs with
validation. Also ensures that the field
has a value if one is required.

To populate these controls with data, their properties can be driven from the properties of the card, through these
key formulas. Note that none of these formulas refers to a specific field. Instead, all information comes from the
card.

CONTROL PROPERTY FORMULA DESCRIPTION

TextRequiredStar.Visible Parent.Required The star appears only if the field is


required. Required is a formula that's
driven by you or the metadata of the
data source.

TextFieldDisplayName.Text Parent.DisplayName The text-box control shows the user-


friendly name, which you or the data
source's metadata provides, and which
is set on the card's DisplayName
property.
CONTROL PROPERTY FORMULA DESCRIPTION

InputText.Default Parent.Default The text-input control initially shows


the value of the field from the data
source, as provided by the card's default
value.

TextErrorMessage.Text Parent.Error If a validation problem occurs, the card's


Error property provides an appropriate
error message.

NOTE
The Parent.Error property is an output-only property that you can't set by using a formula. Therefore, this property won't
appear in list of properties near the upper-left corner or in the Properties or Advanced tabs near the right edge. The
formula bar suggests this property if you're writing a formula that could reference the property.

To pull information out of these controls and push it back into the data source, we have the following key formulas:

CONTROL NAME FORMULA DESCRIPTION

DataCard.DataField "ApproverEmail" The name of the field that the user can
display and edit in this card.

DataCard.Update InputText.Text The value to validate and push back


into the data source when
SubmitForm runs.
Add a list box, a drop-down list, or radio buttons to a
canvas app
10/24/2018 • 2 minutes to read • Edit Online

Show a single column of data (for example, from a multi-column table) in a canvas app so that users can select one
or more items in a list.
Add a list box to allow users to select more than one option.
Add a drop-down list to take up less space on a screen.
Add a set of radio buttons for a particular design effect.
This topic focuses on lists boxes and radio buttons, but the same principles apply to drop-down lists.

Prerequisites
1. Sign up for PowerApps.
2. Sign in using the same credentials that you used to sign up.
3. Under Make your own app, hover over the Canvas app from blank tile, select the phone icon, and then
select Make this app.
4. Learn how to add and configure controls.

Create a simple list


1. Add a List box control named MyListBox, and set its Items property to this expression:
["circle","triangle","rectangle"]

Your designer looks similar to the following:

2. On the Insert tab, select Icons, select the circle, and move it under MyListBox:

3. Add a triangle and a rectangle, and then arrange the shapes in a row under MyListBox:
4. Set the Visible property of the following shapes to the following functions:

SHAPE SET VISIBLE FUNCTION TO

circle If("circle" in MyListBox.SelectedItems.Value,


true)

triangle If("triangle" in MyListBox.SelectedItems.Value,


true)

rectangle If("rectangle" in MyListBox.SelectedItems.Value,


true)

5. While holding down the Alt key, select one or more shapes in MyListBox.
Only the shape or shapes that you select appear.
In these steps, you used an expression to create a list of items. You can apply this to other elements within your
business. For example, you can use a Drop down control to display product images, product descriptions, and so
on.

Add radio buttons


1. On the Home tab, select New Screen, and then select Blank.
2. On the Insert tab, select Controls, and then select Radio.

3. Rename the Radio control to Choices, and set its Items property to this formula:
["red","green","blue"]

If needed, resize the control to show all the options.


4. On the Insert tab, select Icons, and then select the circle.
5. Set the Fill property of the circle to the following function:
If(Choices.Selected.Value = "red", Red, Choices.Selected.Value = "green", Green, Choices.Selected.Value =
"blue", Blue)

In this formula, the circle changes its color depending on which radio button you choose.
6. Move the circle under the Radio control, as in this example:

7. While holding down the Alt key, select a different radio button to change the color of the circle.
Create dependent drop-down lists in a canvas app
4/5/2019 • 6 minutes to read • Edit Online

When you create dependent (or cascading) drop-down lists, users select an option in a list to filter options in
another list. Many organizations create dependent lists to help users fill out forms more efficiently. For example,
users might select a country or region to filter a list of cities, or users might select a category to show only the
codes in that category.
As a best practice, create a data source for the values in the "parent" and "child" lists (for example,
countries/regions and cities) that's separate from the data source that users update by using the app. If you take
this approach, you can use the same parent and child data in more than one app, and you can update that data
without republishing the app or apps that use them. You can accomplish the same outcome by using a collection or
static data, but it isn't recommended for enterprise scenarios.
For the scenario in this topic, store employees submit issues to an Incidents list through a form. Employees
specify not only the location of the store at which the incident occurred but also the department within that
location. Not all locations have the same departments, so a Locations list ensures that employees can't specify a
department for a location that doesn't have that department.
This topic uses Microsoft SharePoint lists as data sources, but all tabular data sources work the same way.

Create data sources


A Locations list shows the departments at each location.

LOCATION DEPARTMENT

Eganville Bakery

Eganville Deli

Eganville Produce

Renfrew Bakery

Renfrew Deli

Renfrew Produce

Renfrew Pharmacy

Renfrew Floral

Pembroke Bakery

Pembroke Deli

Pembroke Produce

Pembroke Floral
An Incidents list shows contact information and information about each incident. Create the Date column as a
Date column, but create the other columns as Single line of text columns to simplify configuration and avoid
delegation warnings in Microsoft PowerApps.

PHONE
FIRST NAME LAST NAME NUMBER LOCATION DEPARTMENT DESCRIPTION DATE

Tonya Cortez (206) 555 - Eganville Produce I had a 2/12/2019


1022 problem
with…

Moses Laflamme (425) 555 - Renfrew Floral I experienced 2/13/2019


1044 an issue…

By default, custom SharePoint lists include a Title column that you can't rename or remove, and it must contain
data before you can save an item in the list. To configure the column so that it doesn't require data:
1. Near the upper-right corner, select the gear icon, and then select List settings.
2. On the Settings page, select Title in the list of columns.
3. Under Require that this column contains information, select No.
After that change, you can ignore the Title column, or you can remove it from the default view if at least one other
column appears.

Open the form


1. Open the Incidents list, and then select PowerApps > Customize forms.

A browser tab opens with the default form in PowerApps Studio.


2. (optional) In the Fields pane, hover over the Title field, select the ellipsis (...) that appears, and then select
Remove.
If you've closed the Fields pane, you can open it again by selecting SharePointForm1 in the left navigation
bar and then selecting Edit fields on the Properties tab of the right-hand pane.
3. (optional) Repeat the previous step to remove the Attachments field from the form.
The form appears with just the fields that you added.
Replace the controls
1. In the Fields pane, select the arrow next to Location.
If you've closed the Fields pane, you can open it again by selecting SharePointForm1 in the left navigation
bar and then selecting Edit fields on the Properties tab of the right-hand pane.
2. Open the Control type list, and then select Allowed Values.

The input mechanism changes to a Drop down control.


3. Repeat these steps for the Department card.

Add the Locations list


1. Select View > Data Sources > Add data source.
2. Select or create a SharePoint connection, and then specify the site that contains the Locations list.
3. Select the check box for that list, and then select Connect.