Skip to content

CheckRequiredFields

You can run a check to make sure that the app user has provided inputs for all required fields. Specific UI controls or rules allow you to define a field as mandatory.

The properties defined in Action are also applicable to this action.

CheckRequiredFields Properties

Property Type Required
RequiredFields string[] Required
_Type const Required

RequiredFields

Names of required fields. Value can be an array of string constants or a rule.

  • type: string[]

All items must be of the type: string


_Type

  • type: const

The value of this property must be equal to:

"Action.Type.CheckRequiredFields"

Action Result

This action does not have an ActionResult if all the specified controls contain a value. Otherwise, the ActionResult is the array of controls missing a value.


Examples

// CheckRequiredFields.action
{
    "OnFailure": "/MDKApp/Actions/FailureMessage.action",
    "OnSuccess": "/MDKApp/Actions/UpdateService.action",
    "RequiredFields": [
        "OrderDesc",
        "OrderQty",
        "Cost"
    ],
    "_Type": "Action.Type.CheckRequiredFields"
}