Parameter @ejecutarFx
Usage of the ejecutarFx
Parameter
The ejecutarFx
parameter is used to execute a validation defined in the menu item and is called in the validation configuration tab of a field in the form. This parameter allows integrating custom validations within form fields, ensuring that the entered data meets the specified criteria.
To add a validation created in the menu item using this parameter, visit this link.
Syntax
return @ejecutarFx("validationName", { "value": @respuesta(fieldId), /* other parameters if necessary */ })
- The first argument is the name of the validation to be executed.
- The second argument is an object that must contain a default “value” field, which refers to the response of the field to which the validation is being added. Additionally, other parameters can be included in the object if required by the menu item validation for proper execution.
- The parameters within the object must be enclosed in quotes for the function to work correctly.
Examples
Example 1: Executing an ID Validation with a Single Field
For an identity document validation like the following:

Which is intended to validate the following field:

The function call would be:
return @ejecutarFx("validateDocumentIdLength", { "value": @respuesta(35) })
Example 2: Executing a Validation with Parameters
For a validation that checks both a name and a monetary value like the following:

Which is intended to validate the following field:

The function call would be:
return @ejecutarFx("nameAndAmountValidation", { "value": @respuesta(2000022), "importe": @respuesta(20) })
Note
Ensure that you provide the correct names for the validations and pass the necessary parameters according to the definition of the validation being used. Always use quotes for the parameter keys inside the object to avoid execution errors.