How to display array elements as separate rows in the Workshop module's Object Table widget in Palantir Foundry?

Displaying Array Elements as Separate Rows in the Workshop Module’s Object Table Widget in Palantir Foundry

Hi everyone,

I’m working with a dataset in Palantir Foundry, where I have an object that contains multiple properties, each storing an array of strings. When I use the Object Table widget in the Workshop module to display these properties, the entire array is displayed as a in a single row instead of each element appearing in a separate row.

Example of Current Display:

Property groupNames (Array in the dataset):

["team-alpha", "team-beta", "team-gamma"]

How it appears in the Workshop module’s Object Table widget:

team-alpha | team-beta | team-gamma

(All values appear in a single row)

Desired Display Format:

Instead of being displayed in a single row, I want each value in the array to appear in a separate row, like this:

team-alpha
team-beta
team-gamma

(Each value from the array should be displayed in its own row)

Key Requirements:

  1. I want this transformation to happen within the Workshop module’s Object Table widget.
  2. The alignment with other properties in the object must be maintained (i.e., each row should still correctly represent its respective object instance).
  3. If an object has multiple array-type properties, each array should be expanded similarly while keeping their association with the corresponding object.

Question:

Is there a way to properly configure the Object Table widget or use a function in Foundry’s Functions API to transform the array properties so that each element appears in a separate row?

Any guidance on how to achieve this would be greatly appreciated! Thanks in advance! :blush:

If you aren’t able to implement this with Ontology links to a Team object type, then your best bet is to create a new object type that has the necessary properties you want to display in your Object Table, and then have a function return objects of this type, based on your input object.

The flow could be like this:

ObjectTypeA (say 1 object with 3 teams) → Function → 3x ObjectTypeB

ObjectTypeA is what your user will select/filter on, but ObjectTypeB is what the table will display.

If you want to make things like selections easier, you can create a link between these two types, so ObjectTypeB has a many-to-one relationship with ObjectTypeA. This will make it easy to pass the linked object of TypeA to any further functions you may want to run.