Apps and Files widgets enable embedding, displaying, and linking other Foundry apps within the current Object View. These Embedded Widgets can support assets built in other apps, such as Quiver or Slate. Additionally, they enable the Object View to display media, upload files, add hyperlinks or allow comments and conversations on that object.
If you are interested in building a more sophisticated Object View, consider creating a Workshop-backed tab.
Some of the widgets below are not object-aware. This means interaction with other widgets in the Object View is limited. * Example 1: Using the Comments Widget is only saved within that specific Object View, and does not write back to the actual object. If these comments might be useful outside the context of the specific object, consider using Actions to capture them. * Example 2: Adding files using “Linked Files” is saved in Foundry, but it’s not linked to the object. If you wish to have these files re-usable, consider using Actions attachments. * Example 3: Embedding Slate or Contour does allow you to pass parameters, but it doesn’t publish or consume filters and doesn’t allow cross-filtering with other widgets such as the Charts Widget.
For detailed steps on how to embed a Quiver template in an Object View, see the Quiver templates documentation.
This widget displays a Slate application within an object view and supports state sharing and interactivity between the two applications. From the object view to the Slate application, the current object context and the active filter state are made available. From the Slate application to the object view, a set of events are are provided within Slate which map to behaviors within Object Explorer, such as opening new Object or Exploration tabs and updating the object view filters.
Slate Resource Chose a Slate resource to display. Ensure that all users with permission to view the object can also view the application.
A "responsive" design for the Slate resources will give the best results as the application will resize based on the object view layout and the available screen dimensions.
Default Parameters
By default the IDs of the current object and its object type are passed to the Slate dashboard and can be mapped to variables. These can be toggled off or have their target variables changed. The default variable names are objectId
and objectTypeId
. In the Slate application, ensure that the matching Variables are manually created in the Variable tab.
Custom Parameters Use additional custom parameters to pass either property values or static, pre-defined values into the Slate application. Create a matching Variable in the Slate application to capture these parameters and use them in the application.
The configured parameters are passed into the Slate application when it loads. When configuring your Slate application, each parameter must have a corresponding Variable created in the Variable panel. Learn more about how to use variables. To check the keys and values of the parameters being passed from Object Explorer to Slate, you can select “View parameters” from the debugging toolbar within the object view editor.
The object view filters are shared in the IObjectSetFilter format for easy use with the Object Set APIs available within Slate. They are automatically sent to Slate using a cross-frame postMessage
when they change and can also be requested manually using an event sent from Slate to Object Explorer. This request event can be used to trigger sending the filters when your Slate dashboard is first ready to receive them.
To capture the filters within Slate you should configure a slate.getMessage
event handler which takes the post message payload, parses it as JSON and then sets the result in a variable. Learn more about events. The following should be enough to capture the filters in a variable:
Copied!1 2
const payload = {{slEventValue}}["payload"] return JSON.parse(payload);
There are two formats that the filters can be consumed in. One format contains all filters without the origin object type they may be based on, the other format contains the filters grouped by object type as well as a separate list for filters which are not based on a specific object type.
The payload for all filters has the following shape:
Copied!1 2 3 4
{ "type": "HUBBLE_SLATE_WIDGET // ACTIVE_FILTERS_UPDATED", "payload": <IObjectSetFilter[]> }
The payload for filters grouped by object type has the following shape:
Copied!1 2 3 4 5 6 7 8 9
{ "type": "HUBBLE_SLATE_WIDGET // ACTIVE_FILTERS_BY_OBJECT_TYPE_ID_UPDATED", "payload": { "filtersByObjectType": { [objectTypeId]: <IObjectSetFilter[]> }, "globalFilters": <IObjectSetFilter[]> } }
Event types available for Slate to trigger events within Object Explorer include:
Trigger these events using the slate.sendMessage
action. From this action, return the event message object from the custom logic. Learn more about events. The expected format for each event is listed below. For help debugging your event integrations, use the object view editor’s debugging toolbar. This will show a warning when a post message is captured but the event payload is incorrect in some way.
Open a new object tab in Object Explorer (using object RID)
This event primarily relies on the objectRid
parameter but can optionally take a tabId
if the object view should be opened on a specific tab.
Copied!1 2 3 4 5 6
{ "type": "HUBBLE_SLATE_WIDGET // OPEN_OBJECT_BY_RID", "payload": { "objectRid": "...", }, }
Open a new object tab in Object Explorer (using object primary key) If the object RID is not known then the object view can also be loaded using the object’s primary key properties along with its object type ID.
Copied!1 2 3 4 5 6 7 8 9
{ "type": "HUBBLE_SLATE_WIDGET // OPEN_OBJECT_BY_PRIMARY_KEY", "payload": { "objectTypeId": "...", "primaryKey": { ... }, }, }
Open a new exploration tab in Object Explorer for a given object set A new search/exploration tab can be opened by providing an Object Set. These object sets should be of limited complexity in order to avoid issues with representing them within the exploration UI.
Copied!1 2 3 4 5 6 7 8
{ "type": "HUBBLE_SLATE_WIDGET // OPEN_NEW_SEARCH_FOR_OBJECT_SET", "payload": { "objectSet": { ... } }, }
Publish object set filters to the object view
Many object view widgets can publish filters which effect other widgets in the view. The Slate widget can do this by sending the filters to be published using this event. The latest published filters will replace any filters previously published by the same Slate widget so the state of these filters should be managed internally within Slate. The filters should be filtered as Object Set Filters, the same format used with requests to the Object Set Service APIs. Filters can be provided for specific object types (filtersByObjectType
) or for global properties (globalFilters
).
Copied!1 2 3 4 5 6 7 8 9 10 11
{ "type": "HUBBLE_SLATE_WIDGET // PUBLISH_OBJECT_SET_FILTER", "payload": { "filtersByObjectType": { ... }, "globalFilters": { ... } }, }
Clear object set filters on the object view The published filters present on the object view can be quickly cleared using this event. It requires no payload.
Copied!1 2 3
{ "type": "HUBBLE_SLATE_WIDGET // CLEAR_PUBLISHED_FILTERS" }
Refresh the data on the current object view If updates have been applied to the data present within the object view it may be required to trigger a refresh of the data. This event can be used to do so. It requires no payload.
Copied!1 2 3
{ "type": "HUBBLE_SLATE_WIDGET // REFRESH_OBJECT_VIEW" }
Request resending the object view filters to Slate As described above in the “Accessing object view filters” section, the filters present on the object view published by other widgets are sent to Slate using a post message. When the Slate dashboard has initialized and is ready to handle the filters is should fire this event to request them. A separate event will be sent from Hubble containing the filters. There are two types of filters you can request, one format contains all filters regardless of their origin object type, the other contains the filters grouped by their origin object type. These requests require no payload.
For all filters send:
Copied!1 2 3
{ "type": "HUBBLE_SLATE_WIDGET // REQUEST_ACTIVE_FILTERS" }
For filters grouped by object type send:
Copied!1 2 3
{ "type": "HUBBLE_SLATE_WIDGET // REQUEST_ACTIVE_FILTERS_BY_OBJECT_TYPE" }
This widget shows a single large inline preview of a media file, given an attachment property or a property that is a URL of some type of media (image, PDF, etc.).
To use the Media Preview widget, you will need to configure the current object in view to include an attachment property. Attachment properties store the relevant media within Foundry and ensure that the media is correctly permissioned by inheriting the permissions from the object they have been added to. See this page to learn how to add media to your attachment property.
Alternatively, the Media Preview widget can also be used to display existing media on Foundry using URLs stored in a property. Users viewing the object view will require access to both the object and the location the media is stored. To add media to your object views, follow these steps:
Once this dataset has been created, you can add additional files as needed. To do so, click Import on the top right of the dataset preview.
In the dialog that appears, select additional files to upload.
https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/transactions/{transaction rid}/{filename}
OR https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/{dataset rid}/views/{branch name}/{filename}
https://{my-foundry-url}/foundry-data-proxy/api/web/dataproxy/datasets/ri.foundry.main.dataset.39ce332b-1d74-40ca-be35-5a5b48459a9a/transactions/ri.foundry.main.transaction.00000000-0000-30d2-8067-4b5d9c819f4c/sample-doc.pdf
/foundry-data-proxy/api/dataproxy
and NOT /foundry-data-proxy/api/web/dataproxy
hubble:media_url
in the Ontology: Create a property for the column in the Ontology, and give it a Typeclass with kind = hubble
and name = media_url
.
hubble:icon
and hubble:thumbnail
. These will use this URL as the icon for an object or as a thumbnail in the search results cards, respectively.Other parameters to configure:
The Hyperlinks widget creates a button that works as a simple link to a webpage. You can add any number of links to an object view and each can be either static (that is, the same link for all objects instances) or dynamic per-object link.
site_URL
defined in your ontology, where object 1 has the site_URL
set to https://palantir.com
and object 2 has the site_URL
set to https://palantir.com/uk
.https://
{ }
.
report_rid
, you could have a button to open the report associated with each object by using the URL template /workspace/report/{report_rid}
.Common issues and notes:
The Linked Files widget enables users to link the object in view to a file, either by browsing with a resource selector to select a file already in Foundry, or by uploading a new file to Foundry from their local machine.
This section has no customization options. You can still change the title and other general formatting under the Format tab.
Common issues and notes:
You can embed an inline frame of a Slate dashboard or other Foundry application in the Object View as a "webpage within a webpage". Using an iframe enables you to pass values from the current object to filter variables in Slate or parameters in Contour.
To embed an iframe, you need to configure the link to the correct Foundry address using Handlebar syntax as described below.
/workspace/
.
https://EXAMPLE.palantirfoundry.com/workspace/report/ri.report.main.report.ABCDEF-1234-5678
, you should keep /workspace/report/ri.report.main.report.ABCDEF-1234-5678
.https://EXAMPLE.palantirfoundry.com/workspace/slate/documents/SLATE_DOCUMENT_NAME
, you should keep /workspace/slate/documents/SLATE_DOCUMENT_NAME
.embedded=true
to simply show the full view. Add a prefix of /?
if embedded=true
is the only statement, or &
if embedded=true
is attached to other statements.
/workspace/report/ri.report.main.report.ABCDEF-1234-5678/?embedded=true
/workspace/slate/documents/SLATE_DOCUMENT_NAME/latest?&embedded=true
&
and state which values you wish to inject to Slate within curly brackets, like {{propertyID}}
. This is based on Handlebar syntax.
/workspace/report/ri.report.main.report.ABCDEF-1234-5678/?PARAMETER_NAME={{propertyID}}&embedded=true
/workspace/slate/documents/SLATE_DOCUMENT_NAME/latest?VARIABLE_NAME={{propertyID}}&embedded=true
&__rp_headerBar=hidden
.This widget enables a local dialog box for users collaborating on an object, with the option to mention other users (by tagging @user_name
).
These comments are not captured on the object itself and do not enable any future search or reuse of this conversation across Foundry.
This section has no customization options. You can still change the title and other general formatting under the Format tab.
If the source dataset for an object type is changed, the corresponding comment feed will disappear.
Comments added through this widget are not written back as part of the Ontology; that is, these comments are not saved as a property on the current object. If your commenting use case includes search, analysis, or learning from comments, consider using Actions.