activities
latest
false
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.
UiPath logo, featuring letters U and I in white

Actividades del flujo de trabajo

Última actualización 28 de feb. de 2026

Casillas de verificación dinámicas

This is a step-by-step tutorial demonstrating how to configure and use dynamic checkboxes. Dynamic checkboxes allow you to view an entire list of data entries and select one or more, according to your use case. Dynamic checkboxes are created using the Select Boxes component in the Form Designer.

Nota:

Este tutorial muestra cómo configurar casillas de verificación dinámicas solo para tipos de proyectos C#.

Tutorial

Para usar esta función:

  1. Add an Invoke Code activity into your workflow. This is where you create a List of strings, that holds the choices that appear dynamically in the form.
    • Haz clic en Editar argumentos y crea un argumento llamado, para este ejemplo, choiceList. Establece la Dirección como In/Out y el Tipo como List<String>. En el campo Valor , pulsa CTRL + k en tu teclado y crea una variable List<String> , llamada GchoiceList. Esta variable contiene las opciones que deseas mostrar de forma dinámica.

      docs image

    • Haz clic en Editar código e introduce el fragmento de código de inicialización. Asegúrate de utilizar la sintaxis correcta en función del lenguaje de programación elegido (C# o VB.NET). Por ejemplo, para definir cuatro opciones para el argumento choiceList , utiliza el siguiente código:

      choiceList = new List<string>();
      choiceList.Add("Choice1");
      choiceList.Add("Choice2");
      choiceList.Add("Choice3");
      choiceList.Add("Choice4");
      choiceList = new List<string>();
      choiceList.Add("Choice1");
      choiceList.Add("Choice2");
      choiceList.Add("Choice3");
      choiceList.Add("Choice4");
      
  2. Add a Create Form activity into your workflow.
    • Abre la ventana de propiedades ColecciónDeCamposDeFormulario .

    • Crea un tipo de argumento Dictionary<String,Boolean> . Nómbralo choices, establece la Dirección como In/Out y el Valor como la variable choices . Este argumento asigna las opciones seleccionadas en el formulario de nuevo al flujo de trabajo.

    • Crea un tipo de argumento List<String> . Nómbralo choices_selectboxes, establece la Dirección como In/Out y el Valor como la variable GchoiceList . Este argumento hace que la lista que contiene las opciones (Gchoicelist) sea dinámica, añadiéndole el sufijo _selectboxes .

    • Marca GenerateInputFields. Esto permite que el formulario genere automáticamente un componente Cuadros de selección dentro del formulario, en función de los argumentos asignados en la ventana de propiedades ColecciónDeCamposDeFormulario .

      docs image

      Nota:

      The form determines automatically that it is dealing with a set of dynamic checkboxes and displays them accordingly.

      These checkboxes can then be later edited from the Form Designer (for example, setting the minimum or maximum choices a user can make).

  3. Add a For Each activity into your workflow. This activity iterates through every choice in the dynamic list and retrieves the name and value for each choice.
    • En la propiedad TipoDeArgumento , elige System.Collections.Generic.KeyValuePair<System.String,System.Boolean>.
    • Dentro del cuerpo de la actividad, escribe keyVal en el campo ParaCada .
    • Dentro del cuerpo de la actividad, pasa la variable choices en el campo En .
  4. Add a Log Message activity into the Body of the For Each activity. This activity is used to output the choices selected by a user inside the form.
    • Establece el Nivel de registro como Info.

    • En el campo de propiedad Mensaje , pasa la siguiente expresión: keyVal.Key +":" + keyVal.Value.

      docs image

Resultado

The Select Boxes component is dynamically populated with the values held in the GchoiceList. For this example, a business user selects the first and second choice inside the form. When the form is submitted returns into the workflow, it displays the choices selected by the user as True and the ones that haven't been selected as False, in the Output panel.

docs image

Flujo de trabajo de muestra

Para comprobar el flujo de trabajo completo o para tener una referencia futura, descarga el ejemplo XAML

  • Flujo de trabajo de muestra

¿Te ha resultado útil esta página?

Obtén la ayuda que necesitas
RPA para el aprendizaje - Cursos de automatización
Foro de la comunidad UiPath
Uipath Logo
Confianza y seguridad
© 2005-2026 UiPath. Todos los derechos reservados.