activities
latest
false
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.
UiPath logo, featuring letters U and I in white

Workflow-Aktivitäten

Letzte Aktualisierung 23. Feb. 2026

Erweiterte Steuerelemente für Dropdownmenüs

The tutorials on this page demonstrate using drop-down lists with the UiPath Form Designer, inside the Create Form Task activity. The most used property for achieving the results in the tutorials is the FormData(Collection).

Dynamische Dropdownmenüs erstellen

Verwenden Sie sie in Workflows, in denen Sie dynamische Daten senden möchten, um ein Dropdown-Steuerelement in einer Formularaktion auszufüllen.

With this method, a variable of the type List of Strings holds the values of the drop-down list instead of adding static values on the Data tab in the UiPath Form Designer.

Im folgenden Beispiel erstellen wir eine dynamische Dropdownliste mit Ländern, initialisieren eine Variable mit der Liste der Länder und erstellen eine zusätzliche Variable, um das von den Benutzern ausgewählte Land zu erfassen.

docs image

To create a dynamic drop-down:

  1. In the Create Form Task activity, click the ellipsis (...) to the right of FormData.
  2. Fügen Sie ein Argument für die dynamische Dropdownliste wie folgt hinzu:
    • Name: countryList_dropdown

    • Direction: In

    • Type: List of Strings (List<String>)

    • Value: Press Ctrl + K and enter listOfCountries as the variable name.

      Die Variable listOfCountries enthält die Elemente in der Dropdownliste.

      Hinweis:

      Array of Strings is also supported, but you must manually add the drop-down component in Form Designer and add the Field Key value.

  3. Wenn Sie die Benutzerauswahl wieder in den Workflow zurückholen möchten, fügen Sie ein weiteres Argument hinzu, um den ausgewählten Wert zu erfassen:
    • Name: country (der Feldschlüssel der Dropdown-Komponente)
    • Direction: In/Out or Out
    • Type: String
    • Value: Press Ctrl + K and enter selectedCountry as the variable name.
  4. Click OK to close Form Data.
  5. Open the Variables panel and initialize listOfCountries with the default value new List(of string) from { "India", "Romania", "US" }.
    Tipp:

    You can also choose to populate listOfCountries through other activities instead of initializing it.

Erstellen von kaskadierten Dropdownmenüs

Verwenden Sie sie in aufgabenbasierten Formularen, wenn Sie möchten, dass die Auswahl in einer Dropdownliste (übergeordnet) die Werte in der zweiten Dropdownliste (untergeordnet) ausfüllt.

docs image

So erstellen Sie eine kaskadierte Dropdownliste:

  1. In the Create Form Task activity, click the ellipsis (...) to the right of FormData.

  2. Binden Sie das übergeordnete Dropdown-Menü an den Workflow.

    Erstellen Sie in diesem Beispiel ein Argument, das die listOfCountries List<String> -Variable als Dropdownliste an den Workflow übergibt.

    Hinweis:

    Die Variable listOfCountries enthält die Elemente in der übergeordneten Dropdownliste, d. h. die Liste der Länder.

    1. Benennen Sie das Argument CountryList_dropdown. Der Eigenschaftsname Feldschlüssel für dieses Argument lautet CountryList.
    2. Legen Sie die Richtung als In fest
    3. Typ als System.Collections.Generic.List<System.String>festlegen
    4. Legen Sie den Wert als listOfCountries List<String> -Variable fest.
  3. Binden Sie das untergeordnete Dropdown-Menü an den Workflow.

    Erstellen Sie in diesem Beispiel ein Argument, das die Variable stateDictionaryList Dictionary<String, List<String>> als Dropdownliste an den Workflow übergibt.

    Hinweis:

    Die stateDictionaryList -Variable enthält die Elemente in der untergeordneten Dropdownliste, d. h. die Staaten für jedes Land.

    1. Benennen Sie das Argument stateDictList_dropdown. Der Eigenschaftsname Feldschlüssel für dieses Argument lautet stateDictList.
    2. Legen Sie die Richtung als In fest
    3. Typ als System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.String>festlegen
    4. Legen Sie den Wert als stateDictionaryList Dictionary<String, List<String> -Variable fest
  4. Binden Sie das untergeordnete Dropdown-Menü an das übergeordnete Dropdown-Menü.

    Create an argument with the name of the child dropdown and add the _parent suffix. Then set the Value of the argument to the name of the parent dropdown, like this: ”ParentDropdownVariableName”.

    Erstellen Sie für dieses Beispiel ein Argument mit dem Namen stateDictList_parent. Die untergeordnete Dropdownliste ist stateDictList und Sie fügen das Suffix _parent hinzu.

    1. Legen Sie die Richtung als In fest.
    2. Legen Sie den Typ als String.
    3. Legen Sie den Wert als ”CountryList” fest.

    When populating the stateDictList Dictionary variable, take note that the dictionary Key is a value from the parent drop-down list and its corresponding Value is a list of options to be shown on the form if the parent is set to the key.

    Tipp:

    Sie können die Werte übergeben, um sie in der FormData- Sammlung vorab auszufüllen. Wenn Sie untergeordnete Werte übergeben, stellen Sie sicher, dass Sie auch den übergeordneten Wert einschließen, um unerwartetes Verhalten zu vermeiden.

  5. Map each value from the parent drop-down to a List of Strings variable. You can populate the list (dictionary) for the parent drop-down in any way, but for this example, we use an Add to Dictionary activity for each value.

    • Dictionary: the dictionary of the child drop-down, stateDictList.
    • Key: a value from the list of strings for the parent drop-down, CountryList - in this example, "US", "India", and "Romania".
    • Value: Press Ctrl + K and enter a name for the the List of Strings variable which holds the values to show in the child drop-down when the Key value is selected in the parent - usaStatesList, indianStatesList, and romanianCountyList, respectively.
  6. Make sure you place the activity or activities for the above step before the Create Form Task activity.

  7. Click OK to close Form Data.

  8. Open the Variables panel and initialize the new List of String variables you created with the following default values:

    • Für indianStatesList: new List(of string) from { "Odisha", "Rajasthan", "Karnataka" }
    • Für usaStatesList: new List(of string) from {"Florida", "Georgia", "Washington"}
    • für romanianCountyList: new List(of string) from {"Cluj", "Prahova", "Constanta"}.

Laden Sie diese Beispiele hierherunter

Erstellen von kaskadierten Dropdownmenüs in den Komponenten „Edit Grid“ und „Data Grid“

To use cascaded drop-downs inside a Edit Grid or Data Grid component:

  1. Create the drop-down fields following the steps above (using the FormData wizard).

  2. Öffnen Sie den Formular-Designer.

  3. Wenn die Dropdownfelder nicht in Ihrem Formular erstellt werden, überprüfen Sie Folgendes:

    • The <dropdownKey> , <dropdownKey>_dropdown, and <dropdownKey>_parent arguments are correctly added in the FormData collection.
    • The GenerateInputFields box is checked.
  4. Drag and drop the Edit Grid or Data Grid component.

  5. Drag and drop the drop-downs created at Step 1 into the Edit Grid or Data Grid component.

  6. Öffnen Sie das Konfigurationsmenü für die untergeordnete Dropdownliste (klicken Sie auf ).

  7. In the Logic tab, notice the preconfigured advanced logic.

    docs image

  8. Navigate to the Actions > Schema Definition field.

  9. Ersetzen Sie [data.<parent_dropdown_key>] durch [row.<parent_dropdown_key>] im Schemaausdruck.

    docs image

    Hinweis:

    Das Zeilenschlüsselwort weist das Formular an, den übergeordneten Wert aus der Rasterzeile zu verwenden.

  10. Speichern Sie das Formular.

Festlegen der Anzahl der Suchergebnisse für Dropdown-Menüs

Dropdown-Menüs zeigen standardmäßig höchstens vier Suchergebnisse an. Sie können diesen Grenzwert ändern, indem Sie eine Eigenschaft im Formularentwurf festlegen.

To set the number of search results for a drop-down:

  1. In the UiPath Form Designer, click Edit to open settings for the drop-down list and then select the Data tab.
  2. Under Choices.js options, add { "searchResultLimit" : x }, where x is the maximum number of results you want to show.

Anzeigen aller Optionen in Dropdownmenüs

Wenn die Zeichenfolgen im Dropdownmenü mehr als 50 Zeichen haben, werden sie möglicherweise nicht angezeigt.

So zeigen Sie alle Optionen an, die Ihrem Suchbegriff entsprechen:

  1. Klicken Sie auf JSON bearbeiten docs image für die Dropdownlistenkomponente, die Sie bearbeiten möchten.
  2. In the Component JSON field, add the following properties:
    ...
      "fuseOptions": {
        "distance": 800,
        },
      "threshold": 1,
      "useExactSearch": false,
    ...
    ...
      "fuseOptions": {
        "distance": 800,
        },
      "threshold": 1,
      "useExactSearch": false,
    ...
    
Hinweis:

Die Eigenschaft threshold gibt an, an welchem Punkt der Algorithmus die Suche nach dem gegebenen Suchbegriff beendet. Beispielsweise erfordert ein threshold von 0 eine genaue Übereinstimmung von Buchstaben und Standort. Ein threshold von 1 kann alles finden, sogar Rechtschreibfehler. Passen Sie den Wert threshold basierend auf Ihrem Anwendungsfall an.

War diese Seite hilfreich?

Hilfe erhalten
RPA lernen – Automatisierungskurse
UiPath Community-Forum
Uipath Logo
Vertrauen und Sicherheit
© 2005–2026 UiPath. Alle Rechte vorbehalten