Frontend Select decorator guide

5min

The select decorator allows you to select your inputs from a predefined list inside your custom action.

In the following example we will create a custom action that will allow us to calculate the sum of three numbers, two will be selected from a dropdown and a third one will be added manually.

1. First, you will need to handle the minimum requirements  for your project by using the Procesio nuget and editing the project file.

2. The libraries required by this custom action are:

C#


3.  Create your custom action in a new class and configure the class decorator.

C#


4. Implement the IAction interface.

5. Create the variables that accept inputs from the list.

C#


6. We will also create the third variable that will accept the manual input.

C#


7. Create the variable that will contain the sum of all three.

C#


8. Create a list inside the Custom Action.

C#


Each option is identified by a name and value that contain the value of the option.

9. Inside the execute function we will decide what to do with the variables.

C#


10.  Generate and upload the nuget.

11.  Create the result variable.

Document image


12. Drag the custom label on the canvas and link the actions.

13. Select the custom action and enter the values in the Input tab.

Document image


14. Save, Validate and Run the process.

15. Click Check instances to view the result.

The code used to create the custom action can be found here.