在 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、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,並在您的應用程式中管理 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 中的 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、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:

  • 自動從資料產生應用程式,例如自訂 SharePoint 清單。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.

注意

若您想要改為使用 PowerApps Studio,請開啟 [檔案] 功能表,然後按一下或點選 [連線],powerapps.com 即會開啟,您可以在該處建立及管理連線。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.