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 24. Feb. 2026

Ausführen des Do-Blocks bei Änderung des Kontrollkästchens

You can configure activities inside the Do block to execute when a specific checkbox in the form is checked or unchecked.

Tutorial

So verwenden Sie diese Funktion:

  1. Add the Create Form activity to your workflow.

  2. Inside the Do block, configure the desired activities.

  3. Open the Form Designer from the Create Form activity.

  4. Drag and drop a Checkbox component.

  5. Klicken Sie auf der Registerkarte Daten auf **Berechneter Wert**. Dadurch wird eine Liste von Feldern erweitert.

  6. In the JavaScript field, enter the following JavaScript code:

    const updateOnChange = instance.updateOnChange;
        instance.updateOnChange = function(flags, changed) {
              if (flags.modified) {
               instance.emit('execute', instance.component.key , {});
              }
    }
    const updateOnChange = instance.updateOnChange;
        instance.updateOnChange = function(flags, changed) {
              if (flags.modified) {
               instance.emit('execute', instance.component.key , {});
              }
    }
    
    Hinweis:

    Das obige Code-Snippet löst die Ausführung der Aktivitäten über den Do- Block basierend auf der Änderung des Kontrollkästchens aus.

  7. Speichern Sie das Formular.

  8. At runtime, when you make changes to the checkbox, notice the activities in the Do block being executed.

Ergebnis

When you select the Checkbox component, the Do block executes. For this example, when you select the Checkbox component, a Message Box pops up.

Wichtig:

Bekanntes Problem: Der Do- Block wird zweimal ausgeführt: wenn Sie die Checkbox- Komponente auswählen und wenn Sie das Formular absenden.

Beispielworkflow

Laden Sie das XAML-Beispielherunter, um den vollständigen Workflow zu überprüfen oder später darauf zurückgreifen zu können

  • Tutorial
  • Beispielworkflow

War diese Seite hilfreich?

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