apps
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。
UiPath logo, featuring letters U and I in white
Apps ユーザー ガイド
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated 2024年11月15日

Apps を Data Service と使用する

バックグラウンド情報

注:
  • A maximum of 1000 records for any filter are retrieved at runtime.
  • After the entity data is loaded, the data is refreshed only when a rule is executed. Any changes made to the entity via processes, or other means, do not automatically update in Apps. Make sure to explicitly refresh the data in these scenarios.
  • The in operator only supports primitive data types, such as: string, number, boolean, null.
in 演算子は、choice-set を使用する Data Service シナリオではサポートされません。代わりに contains 演算子を使用できますが、1 つの入力に対してのみ使用できます。

概要

この例を開始する前に、Data Service に対する適切な権限があることを確認してください。詳細については、『Data Service ガイド』の「アクセス権を管理する」をご覧ください。

For the purpose of this example, we will use an entity called Customer with the following fields:

  • Address
  • 住所 2
  • 市町村
  • メール
  • 名前
  • 電話番号
  • プラン
  • ステート
  • 郵便番号

顧客を州の名前でフィルター処理する

Use the Function: Fetch function to retrieve multiple entity records. Additionally, use the Query builder to filter the retrieved records. In this example, we apply a filter to the Customer entity, so the search only returns customers from the state of Washington.

Refer to The Fetch function for more details.

注:

If you want to retrieve a single record, use the FetchOne function instead.

  1. Open an existing application, or create a new one.
  2. Add a Table control to your app:
    1. [コントロールを追加] を選択します。
    2. Select Display.
    3. Drag the Table control to an area in your app.
  3. Add an entity to your app:
    1. Select the Add anydocs image icon from the top of the canvas.
    2. [エンティティ] を選択します。
    3. Select a tenant.
    4. Select the entity you want to add to your app, then Add.
  4. Bind the entity to the Table control:
    1. In the General tab of the Properties panel, select the Additional resources button adjacent to Data source.
    2. Select Query builder.
    3. Select the entity you want to use, then Add condition.
    4. Select a field from the dropdown menu, then an operator, such as =.
    5. Enter the string by which you want to filter the records, surrounded by quotation marks.
      For example, if you only want customer records from the state of Washington, add "WA" as a value.
  5. Use the Expression editor to apply a filter under specific conditions:
    1. In the Query builder, select the Open resources button, then Expression editor.
    2. Write an expression containing a condition. For example, you can use an IF condition to only apply a filter when a Dropdown control on the main page of the app is not blank and contains a user-specified value:
      Fetch(of Customer)(  
      If(  
      MainPage.Dropdown is Nothing,  
      Nothing,  
      createFilterGroup(New QueryFilter(){addFilter("State", "contains", MainPage.Dropdown.Value)}, Nothing, 0)),  
      Nothing, Nothing, Nothing, New ExpansionFieldOption( {addExpansionFieldOption("CreatedBy", New String(){"Id","Name"}), addExpansionFieldOption("UpdatedBy", New String(){"Id","Name"})})Fetch(of Customer)(  
      If(  
      MainPage.Dropdown is Nothing,  
      Nothing,  
      createFilterGroup(New QueryFilter(){addFilter("State", "contains", MainPage.Dropdown.Value)}, Nothing, 0)),  
      Nothing, Nothing, Nothing, New ExpansionFieldOption( {addExpansionFieldOption("CreatedBy", New String(){"Id","Name"}), addExpansionFieldOption("UpdatedBy", New String(){"Id","Name"})})

When you preview or run the app, the query executes and retrieves the filtered records.

顧客を並べ替える

Use the Query builder to apply sorting options to your search.

  1. Open an existing application, or create a new one.
  2. Add a Table control to your app:
    1. [コントロールを追加] を選択します。
    2. Select Display.
    3. Drag the Table control to an area in your app.
  3. Add an entity to your app:
    1. Select the Add anydocs image icon from the top of the canvas.
    2. [エンティティ] を選択します。
    3. Select a tenant.
    4. Select the entity you want to add to your app, then Add.
  4. Bind the entity to the Table and apply a sorting rule:
    1. In the General tab of the Properties panel, select the Additional resources button adjacent to Data source.
    2. Select Query builder.
    3. Select Additional settings.
    4. In the Sort by field, add the field by which you want to sort, such as Name.
    5. The Sort ascending field is set to true by default. Select the field, then enter False to sort the results in descending order.
  5. Preview or run your app.

    When you preview or run your app, the Table displays records from the Name field in your entity, in alphabetically descending order.

Using entities with Edit Grid

You can use the Edit Grid control to display entity records in your app, and perform CRUD operations on your entity using this control.

Refer to Using Fetch to retrieve entity records in Edit Grid controls and Using entities with Edit Grid controls for more details and practical examples related to the Edit Grid control.

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo White
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.