Need Help with Real-Time Duplicate Checks for User Submissions in Palantir

Short Version - How can I implement real-time duplicate checks for user submissions on a Palantir platform, ensuring that an error message displays and the submission button is disabled if the system name already exists?

Long Version- When a user is filling out a form, I want to have the “system name” checked to make sure that the system does not already exist. I can’t do this in the actions, or automations. Where could I put that?

Hi @EOswald,

You could create the different form inputs yourself, with for instance a text input widget to fill out the system name.

Then you could use the text input variable to filter an object set and check that no objects have this system name (with a count aggregation on this filtered set for instance).

Then the button would be disabled based on whether this count is equal to 0.

And finally, the action would be set to use the text input variable via the “parameter defaults”.
You could also conditionally display a text warning when the system name already exists so that it’s clear why the button is disabled.

Another option could be to have a function-backed action, where you check whether the value already exists, and then throw a user-facing error if needed. You could also implement both. Checking at the action level would definitely be safer than relying on the action being called with the right arguments.