管理 PowerApps 中的连接Manage your connections in PowerApps

powerapps.com 中,创建从 PowerApps 到一个或多个数据源的连接、删除连接或更新其凭据。In powerapps.com, create a connection from PowerApps to one or more data sources, delete a connection, or update its credentials.

应用的数据连接可以连接到 SharePoint、SQL Server、Office 365、OneDrive for Business、Salesforce、Excel 以及许多其他数据源Your 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:

  • 连接到 OneDrive for Business,并在应用中管理 Excel 工作簿中的数据。Connect to OneDrive for Business, and manage data in an Excel workbook in your app.
  • 更新 SharePoint 站点上的列表。Update a list on a SharePoint site.
  • 连接到 SQL Server,并从应用更新表。Connect to SQL Server, and update a table from your app.
  • 在 Office 365 中发送电子邮件。Send email in Office 365.
  • 发送推文。Send a tweet.
  • 连接到 Twilio,并从应用发送短信。Connect to Twilio, and send an SMS message from your app.

必备组件Prerequisites

  1. 注册 PowerApps。Sign up for PowerApps.
  2. 使用注册所用的同一凭据登录到 powerapps.comSign in to powerapps.com using the same credentials that you used to sign up.

数据连接的背景信息Background on data connections

大多数 PowerApps 应用使用称为“数据源”的外部信息,此类信息存储在云服务中。Most PowerApps apps use external information called Data Sources that is stored in cloud services. 一个常见的示例是存储在 OneDrive for Business 中的 Excel 文件中的表。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. 可以利用到数据源的连接,采用 Microsoft Excel 工作簿、SharePoint 列表、SQL 表和许多其他格式来读取和写入数据,并将这些数据存储在 OneDrive for Business、DropBox、SQL Server 等云服务中。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.

除表以外,还有其他数据源类型,例如电子邮件、日历、Twitter 和(即将推出的)通知。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.

除了在 powerapps.com 中创建和管理连接外,还可以在执行以下任务时创建连接:In addition to creating and managing connections in powerapps.com, you also create connections when you do these tasks:

注意:如果要改用 PowerApps Studio,请打开“文件”菜单,然后单击或点击“连接”,随即会打开 powerapps.com,你可以在其中创建和管理连接。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. 如果尚未这样做,请登录到 powerapps.comIf 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. 其他连接器(例如 Microsoft Translator)则不会。Others such as Microsoft Translator, do not.

    例如,这些连接器在使用之前需要提供其他信息。For example, these connectors require additional information before you can use them.

新的连接器显示在“连接”下,可以 将其添加到应用The new connector appears under Connections, and you can add it to an app.

更新或删除连接Update or delete a connection

在连接列表中,找到要更新或删除的连接,然后单击或点击该连接右侧的省略号(3 点符号)。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.