Optional Action Parameter

Hi,

I have a function backed action with an optional parameter for an object reference. OMA labels the parameter as optional. When I submit the action without providing the parameter, I get an error FunctionExecutionHasInvalidInputs

How am I supposed to configure the function, action, and form?

Is there a way to default the action to have a undefined value for the parameter?

In this case the issue was that while the function parameter had undefined as a type it did not explicitly mark the parameter as optional. The parameter must be defined as optional using the ?. Example; materialParameter?: Material is required for the action to execute properly. materialParameter: Material | undefined is insufficient.

OMA picked up that materialParameter: Material | undefined was an optional parameter but the action failed on submission. OMA should not indicate that the parameter is optional if actions will not allow the action to be submitted without a parameter value.

1 Like