使用欄位群組Use field groups

欄位群組可為實體的一或多個欄位建立群組。Field groups provide a way to group one or more fields of an entity. 欄位群組可以加速並簡化應用程式的建立和維護。Field groups can help speed up and simplify the creation and maintenance of apps. 欄位群組包含一或多個欄位,且同一個欄位可以出現在任何數量的欄位群組之中。A field group contains one or more fields, and a field can appear in any number of field groups. 欄位群組中,同一個欄位不能出現一次以上。A field can't appear more than once in a field group.

欄位群組儲存在實體上,並在使用同一實體的所有應用程式之間共用。Field groups are stored on an entity and shared across all apps that use the same entity. 在任何時候,都可能有許多不同的應用程式在使用相同的實體,以及該實體的欄位群組。At any given time, many different apps may use the same entity and field groups of that entity. 欄位群組如此的集中化及共用形式可以強化一致性,因為欄位群組總是顯示相同的欄位,無論在何處使用該群組。This centralization and sharing of field groups helps enforce consistency, because a field group will always display the same fields wherever it's used. 這使維護便得容易,因為欄位群組的變更將會自動反映到所有使用該欄位群組的地方。This makes maintenance easy because a change to a field group is automatically reflected in all the places using that field group. 欄位群組有助於加速應用程式撰寫和自訂程序,因為應用程式作者會使用欄位的群組,而非個別欄位。Field groups help speed up the app authoring and customization process because an application author works with groups of fields, rather than individual fields.

預設欄位群組Default field groups

Common Data Service 包含實體上的數個預設欄位群組。Common Data Service includes several default field groups on entities. 這些欄位群組在不同位置加速和簡化應用程式的建立和自訂。These field groups are used in various places to help speed up and ease app creation and customization.

預設欄位群組名稱Default field group name 說明Description
DefaultListDefaultList 以表格格式顯示記錄清單。Used to display a list of records in a tabular format.
DefaultCardDefaultCard 以卡片格式顯示記錄清單。Used to display a list of records in a card format.
DefaultDetailsDefaultDetails 在檢視中顯示單一記錄的詳細資料,並可以編輯。Used to display the details of a single record in view and edit.
DefaultLookupDefaultLookup 用來顯示查閱、選取記錄。Used to display a lookup to select a record.

檢視欄位群組View a field group

  1. 登入 powerapps.comSign in to powerapps.com.
  2. 如果您有多個環境的存取權限,請確定您已使用頂端列的環境選擇器選取正確的環境。If you have access to more than one environment, ensure that you have the right environment selected using the environment picker in the top bar.
  3. 展開 [Common Data Service] 區段,然後按一下或點選左側瀏覽窗格中的 [實體]Expand the Common Data Service section, and click or tap Entities in the left navigation pane.
  4. 在實體清單中,按一下或點選您想要檢視欄位群組的實體。In the list of entities, click or tap the entity that you want to view the field group for.
  5. 在欄位清單上方的標題中,按一下或點選 [欄位群組]In the header above the list of fields, click or tap Field groups. 現在,您會看到該實體中目前存在的所有欄位群組。You now see all the field groups that currently exist for the entity.
  6. 在欄位群組清單中,按一下或點選您想要檢視詳細資料的欄位群組。In the list of field groups, click or tap the field group that you want to view the details for.
  7. 在欄位群組詳細資料中,並列有兩個清單。In the field group details, there are two lists side-by-side. 其中一個的標題為 [實體欄位],並列出該實體的所有欄位。One is titled Entity fields and lists all the fields for the entity. 另一個的標題為 [欄位群組欄位],並列出欄位群組中包含的欄位。The other is titled Field group fields and lists the fields included in the field group.

編輯欄位群組Modify a field group

  1. 檢視您想要修改的欄位群組。View the field group that you want to modify.
  2. 若要新增欄位,連按兩下中 [實體欄位] 清單中的欄位名稱。To add a field, double-click a field name in the Entity fields list. 您可以從 [實體欄位] 清單拖放欄位至 [欄位群組欄位] 清單。You can also drag and drop fields from the Entity fields list to the Field group fields list.
  3. 若要移除欄位群組,請按一下 [欄位群組欄位] 清單中欄位名稱旁邊的 XTo remove a field group, click the X next to the field name in the Field group fields list.
  4. 按一下或點選 [儲存] 按鈕。Click or tap the Save button.

注意

目前並不支援為標準實體修改欄位群組,但您可以為自訂實體修改欄位群組。*Modifying field groups for standard entities isn't currently supported, but you can modify field groups for your custom entities.*

建立欄位群組Creating a field group

當您建立實體時,會自動建立預設欄位群組。Default field groups are automatically created when you create an entity. 目前不支援建立額外的欄位群組。Creating additional field groups isn't currently supported.

刪除欄位群組Delete a field group

目前不支援刪除欄位群組。Deleting a field group isn't currently supported.

在 Microsoft Excel 中檢視及編輯欄位群組資料View and edit field group data in Microsoft Excel

  1. 檢視您想要檢查的資料之實體的欄位群組。View the field groups for the entity that you want to examine the data for.
  2. 每個欄位群組旁都有 Excel 圖示。There is an Excel icon next to each field group. 只有在欄位群組具有欄位時,才會啟用 Excel 圖示。The Excel icon is enabled only if the field group has fields.
  3. 按一下您想要在 Excel 中開啟的欄位群組之 Excel 圖示。Click the Excel icon for the field group that you want to open in Excel. 將會產生一份活頁簿,其中包含實體欄位清單、Excel 增益集,以及你的環境之指標。A workbook is generated containing the entity field list, the Excel Add-in, and a pointer to your environment.
  4. 開啟瀏覽器所提供的產生的活頁簿。Open the generated workbook that's provided by the browser.
  5. 開啟活頁簿之後,啟用編輯。After the workbook is open, enable editing. 該 Excel 增益集會將資料讀取到活頁簿。The Excel Add-in will then read the data into the workbook. 如需更多資訊,請參閱在 Excel 中開啟實體資料For more information, see Open entity data in Excel.

欄位群組使用量Field group usage

預設欄位群組幫助加速應用程式的撰寫和自訂。The default field groups help speed up application authoring and customization. 目前能供您查看欄位群組作用的地方包含:Some places where you can currently see field groups in action are:

  • 實體表單控制項:實體表單控制項使用預設欄位群組顯示動態表單,協助加速應用程式的撰寫程序、強化一致性,並簡化維護。Entity form control - Entity form control uses the default field groups to display dynamic forms that help speed up the app authoring process, help enforce consistency, and also ease maintenance. 如需詳細資訊,請參閱使用實體表單控制項For more details, see Use the Entity Form control.
  • 查閱控制項:如果您在畫面新增的一或多個欄位是另一個已連結實體的參考,該欄位會轉譯為查閱控制項 (挑選清單)。Lookup control - If one of the fields that you add on your screen is a reference to another linked entity, the field is rendered as a lookup control (picklist). 當使用者按一下查閱控制項,以選取來自已連結實體的記錄,顯示的欄位將由已連結實體的 DefaultLookup 欄位群組判斷。When a user clicks the lookup control to select a record from the linked entity, the fields displayed are determined by the DefaultLookup field group on the linked entity. 僅使用 DefaultLookup 欄位群組的前兩個欄位。Only the first two fields of the DefaultLookup field group are used.
  • 建立應用程式:當您選取從資料建立應用程式的選項來產生應用程式,將自動建立您選擇的實體之畫面。Creating an app - When you generate an app by choosing the option to create an app from data, the screens for the entity that you select are automatically created. [顯示] 畫面的 [顯示表單] 控制項和 [編輯] 畫面的 [編輯表單] 控制項使用 DefaultDetails 欄位群組,以判斷哪些欄位會依預設情況新增到前述畫面。The Display form control on the Display screen and the Edit form control on the Edit screen use the DefaultDetails field group to determine which fields will be added by default to those screens.