Function-backed action in table layout

Hi

I have a workshop application that has a function-back action to create Ontology objects based on user-input values and ontology object links.

I’m trying to use the action’s table layout to bulk create objects in a single action execution (using the table layout instead of the form layout to insert multiple rows)

I’m struggling to find what type of input to configure in the function inputs (the type of output from the action in table layout).
When I try:

  • a list of objects of the same object type, Foundry assumes that I want to select existing instances of the object type
  • to define my own input type (to specify in the main function as CustomFunctionInput type), I get errors that the CustomFunctionInput is a supported input. Example:
    • export interface CustomFunctionInput {
          parameter: dataType;
      }
      
  • to define each parameter as a list, some parameters like boolean seem to not be supported
    • Multiple values of type "Boolean" for parameter "Bonuses" are not supported.
      

Can I get assistances on what input type is expected/passed from table format actions or pointed to the documentation (if exists), I’ve only found table in-line edits which I believe refers to an Object Table widget.

Thanks

You shouldn’t have to change the code of the function backing your action in order to use the table layout. When using the table mode, actions will automatically call your function for each row independently. Are you having an issue with your existing function in table mode?

This is a new function.
I had initially thought that the action will be ran on all rows, but I see that you’re right, it actions per row. And it works.

Thank you.

1 Like