Mark Logic Inputs as Optional

Is it possible to mark logic inputs as optional? I have a workflow where sometimes users select additional objects to pass to the function and sometimes don’t need to.

1 Like

Not currently, its something we are tracking and will be available soon (a couple of weeks).

1 Like

Gotcha! Is there a workaround I could use in the meantime?

When they land they will require you to provide a default value for when the input isn’t provided (we are tracking ‘nullable’ values independently) so it depends on exactly what the input is / what else uses your logic.

One option is to create a wrapping logic (or typescript) function that doesn’t accept the soon-to-be-optional parameter and just forwards a default value to the original, then depending on where you call it from you either use the original (where you can provide the value) or the wrapper when you don’t have a value.

1 Like