通知を受け取る

UiPath Activities

UiPath Activities ガイド

カスタム入力 (Custom Input)

UiPath.System.Activities.CustomInput

Loads and displays a custom HTML form into a browser window, enabling you to collect certain data from a human user. The data gathered in the form can then be further processed with subsequent activities. The language that can be used inside the file is not limited to HTML, any other language being supported. To be able to retrieve the data inside Studio, the HTML file must contain a certain JavaScript function, which is further detailed here.

プロパティ

共通

  • DisplayName - The display name of the activity.

入力

  • URI - The URI of the HTML file you want to load. This field supports only strings and String variables. In this field you can enter a file path or an URL.

📘

注:

URL を使用する場合には、完全形式で入力する必要があります。たとえば、https://activities.uipath.com/docs/custom-input/ です。

その他

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

出力

  • Result - The data from the custom input form, stored in a String variable. This field supports only String variables.

カスタム HTML ファイルの作成

📘

重要!

アクティビティがフォームに入力されたデータを取得できるようにするには、HTML スクリプトに、Result が取得するデータとなる window.external.setResult([Result]) タグを含める必要があります。

Let's take, for example, an HTML file that retrieves the First Name, Last Name and Age of a human user. The input form looks like this:

The HTML code behind this page looks like this:

<!DOCTYPE html>
<html lang="en">

 <head>

    <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>UiPath KYC Solution</title>

  </head>

  <body>
      
          First Name:<br>
          <input type="text" id="First_Name"><br>
          Last Name:<br>
          <input type="text" id="Last_Name"><br>
          Age:<br>
          <input type="text" id="Age"><br>

          <button onclick="SubmitValues()">Submit</button>
    
  </body>
  </html>

This page does not contain the necessary code to send the gathered data back to the user. After adding it, the file should look like this:

<!DOCTYPE html>
<html lang="en">

 <head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>UiPath KYC Solution</title>

  </head>

  <body>
      
          First Name:<br>
          <input type="text" id="First_Name"><br>
          Last Name:<br>
          <input type="text" id="Last_Name"><br>
          Age:<br>
          <input type="text" id="Age"><br>

          <button onclick="SubmitValues()">Submit</button>


          <script type="text/javascript">
          function SubmitValues(){
            var First_Name = document.getElementById("First_Name").value;
var Last_Name = document.getElementById("Last_Name").value;
var Age = document.getElementById("Age").value;
window.external.setResult(First_Name+ "," + Last_Name + "," + Age);
            return true;
          }
            
          </script>
  </body>
  </html>

[カスタム入力] アクティビティの使用例

To exemplify how to use this activity, we have built a simple automation project which gathers the First Name, Last Name and Age from a human user and then displays it in a message box. You can download the project and the corresponding example HTML page here.

1 年前に更新


カスタム入力 (Custom Input)


改善の提案は、API 参照ページでは制限されています

改善を提案できるのは Markdown の本文コンテンツのみであり、API 仕様に行うことはできません。