从模板创建并运行应用Create and run an app from a template

基于针对特定方案的模板自动创建应用,然后运行该应用,了解其默认行为。Create an app automatically based on a template for specific scenario, and then run it to understand its default behavior. 有关如何自定义应用,然后保存以供他人共享的实验。Experiment with how to customize an app, and then save and share it with others.

先决条件Prerequisites

  • 注册安装 PowerApps,然后打开该程序,并提供注册所用的同一凭据进行登录。Sign up for PowerApps, install it, open it, and then sign in by providing the same credentials that you used to sign up.

    备注

    若要使用此功能,请务必运行 2.0.510 或更高版本。To use this feature, make sure that you're running release 2.0.510 or later. 要确定版本,请(沿左边缘)打开“文件”菜单,单击或点击“帐户,然后在“产品信息”下查看。To identify your release, open the File menu (along the left edge), click or tap Account, and then look under Product information.

  • DropBox、OneDrive 或 Google Drive 等云存储帐户。A cloud-storage account such as DropBox, OneDrive, or Google Drive.

创建应用Create an app

  1. 在适用于 Windows 的 PowerApps Studio 或适用于 Web 的 PowerApps Studio 中,单击或点击“新建”(靠近屏幕左侧边缘)。From PowerApps Studio for Windows or PowerApps Studio for web, click or tap New (near the left edge of the screen).

    “文件”菜单上的“新建”选项

  2. 在“应用模板”磁贴上,单击或点击“手机布局”。On the App templates tile, click or tap Phone layout.

    备注

    还可以通过平板电脑布局模板创建应用,但本教程重点介绍的是手机选项。You can also create an app from a template for a tablet layout, but this tutorial focuses on the phone option.

    用于创建平板电脑或手机应用的选项

    将显示模板列表。A list of templates appears.

  3. 如果未连接到云存储帐户:If you don't have a connection to a cloud-storage account:

    1. 在屏幕底部附近,单击或点击“选择”。Near the bottom of the screen, click or tap Choose.

      用于在模板视图内创建连接的选项

    2. 单击或点击要使用的帐户。Click or tap the account that you want to use.

      用于从模板创建应用的列表连接

    3. 提供凭据,然后单击或点击“使用”授予访问权限。Provide your credentials, and then click or tap Use to grant access.

      连接显示在屏幕底部附近。Your connection appears near the bottom of the screen.

  4. 在模板列表中,单击或点击一个模板,然后单击或点击“使用”(靠近右下角)。In the list of templates, click or tap a template, and then click or tap Use (near the lower-right corner).

    打开 PowerApps 模板

    示例数据将复制到云存储帐户,应用将得以创建,此应用主页也将显示。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, follow the steps in this section to explore how the app works in Preview mode.

提示

请在默认工作区中设计和开发应用,但先在预览模式下进行测试,再与其他人共享应用。Design and develop apps in the default workspace, but test them in Preview mode before you share them with others.

  1. 如果尚未使用过 PowerApps,可以获取简介教程(也可以单击或点击“跳过”)。If you haven't used PowerApps before, take the intro tour (or click or tap Skip).

    打开快速教程屏幕

    稍后可以通过单击或点击右上角附近的问号图标,然后单击或点击“获取简介教程”,随时获取教程。You can always take the tour later by clicking or tapping the question-mark icon near the upper-right corner and then clicking or tapping Take the intro tour.

  2. 在左侧导航栏中,单击或点击最接近顶部的屏幕。In the left navigation bar, click or tap the screen that's closest to the top.

  3. 按 F5(或者单击或点击右上角的右箭头)可在预览模式下打开应用。Press F5 (or click or tap the right arrow in the upper-right corner) to open the app in Preview mode.

    打开预览模式按钮

    应用已使用示例数据进行了预填充,以展示应用的功能。The app is pre-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.

  4. 浏览应用的默认行为,并确认云帐户中的数据可反映所做的更改。Explore the app's default behavior, and verify that the data in your cloud account reflects your changes.

    例如,创建约会并在成本估算器应用内创建预计成本。For example, make an appointment, and create a cost estimate in the Cost Estimator app.

  5. 选择右上角的“X”图标(位于 PowerApps 标题栏下方)返回默认工作区。Return to the default workspace by selecting the 'X' icon in the upper-right corner (under the PowerApps title bar).

    关闭预览模式按钮

自定义应用Customize the app

此外,还可以通过以下方式自定义此应用或任何其他应用:You can customize this or any app in these ways, among others:

后续步骤Next steps

  1. 按 Ctrl-S,为应用程序命名,然后单击或点击“保存”将应用保存到云。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.

    备注

    共享应用前,请确保共享对象有权访问数据。Before you share an app, make sure that the people with whom you're sharing it have access to the data. 例如,必须在云存储帐户中 共享 Excel 或其他文件For example, you must share an Excel or other file in a cloud-storage account.