Form for user selection of input before @Function is executed

Hello Palantir Community,

I’m currently working on a project where I’d like to trigger a function (returning Object Set) that requires mandatory user input. For the following reasons, I’d like to have a form displayed to the user for input selection and confirmation:

  1. Improved Data Accuracy: Ensures critical parameters are reviewed and confirmed, reducing errors from missing or incorrect values.
  2. Consistent User Experience: Aligns with the familiar behavior of action-type functions, making it intuitive for users.

Is there an existing feature that supports this functionality or something currently in development ?

I can think of a possible workaround : triggering an overlay with input selection fields and using a separate button to trigger the event function. However, this approach isn’t very straightforward.

An ideal solution would be to reuse the form mechanism already available for action-type functions, triggered automatically when the event starts. The function and other remaining event would then proceed only after the user confirms the inputs.

Any insights, recommendations, or updates on this would be greatly appreciated!

Best,
Jeremy Chopineau

Hello,

Might function-backed action types be what you are looking for?
Check out this documentation page: https://www.palantir.com/docs/foundry/action-types/function-actions-overview

When I’ve hit these situations, my go-to has been to build the form directly in Workshop and then, as you say, have a button to actually trigger the execution of the function - or even a button, and then a modal that shows the read-only parameter values and a final “Confirm Parameters” button.

For “composability” I’ve sometimes built these as small “stand alone” Workshop modules that pass the inputs and outputs back and forth with the embedded workshop widget.

I can’t really think of a good way to re-use an existing Action Form for this purpose, though I get what you’re saying about having a consistent Form experience.

Hey,

One thing I’ll add to the above replies is that it might be worth reviewing and evaluating whether you need a function to return the object set that populates another dropdown in your action form.

As an example, think of a Request Object Type and an Employee Object Type that are linked by a “reviewer_id” property on requests; Employees also have a property called “Department”. There may be an action type + form that allows users to assign a request object to a particular employee as a reviewer, but you want to make sure the employee being assigned to a request is in the correct department. In such case, your action form might only modify one property (i.e., “reviewer_id”), but the form shown to a user can have two fields/dropdowns: one for the target department and one for the actual Employee object (which will log the employee_id). The value selected by the user for the target department in the first dropdown can be used to filter the values that populate the second dropdown in the action form, and this can be done directly in the Action Type’s configuration in OMA without writing additional code.

This also works for pre-populating dropdown values on an action form that requires search-arounds to other object types.

Again, it may be the case that you still need a function depending on your use case, but just wanted to flag that some of this functionality is available without additional code!

I think the nuance - at least from my read of the original question - is that this is not a Function-backed Action, but rather just an (expensive, I assume) Function that returns an object set.

The original question seems to be “How to create a form like an Action form, but that only runs a Function and returns the object set”.

If this is incorrect, @6793eeec65fff51d8d93 could you please provide further clarification?

Hello,

Thank you all for your responses.
My question, as raised by @lrhyne was whether it’s possible to create a form similar to an Action form that runs a function and returns an object set.

Something nice would be to use an specific type of action to create the action-form but that action still considered as an event (and not an edit action) to returns an object set. I don’t believe such functionality currently exists.

I will use your approach with :

  • 1 button triggering an event to open overlay
  • 1 overlay configured as modal and containing dropdown object and string
  • another button to “validate” the input and trigger a recalculation of the object set → switch to page containing this object set → close overlay

Regards,

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.