import { HostEvent } from '@thoughtspot/visual-embed-sdk';
// Or
// const { HostEvent } = window.tsembed;
// create the liveboard embed.
liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
{ columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
]);
HostEvent
- Index
- Enumeration members
- AddColumns
- AskSage
- CopyLink
- CreateMonitor
- Delete
- Download
- DownloadAsCsv
- DownloadAsPdf
- DownloadAsPng
- DownloadAsXlsx
- DrillDown
- Edit
- EditTML
- Explore
- ExportTML
- GetAnswerSession
- GetFilters
- GetIframeUrl
- GetParameters
- GetTML
- GetTabs
- LiveboardInfo
- MakeACopy
- ManageMonitor
- ManagePipelines
- Navigate
- OpenFilter
- Pin
- Present
- Remove
- RemoveColumn
- ResetLiveboardPersonalisedView
- ResetSearch
- Save
- Schedule
- SchedulesList
- Search
- SetActiveTab
- SetHiddenTabs
- SetVisibleTabs
- SetVisibleVizs
- Share
- ShowUnderlyingData
- SpotIQAnalyze
- SyncToOtherApps
- SyncToSheets
- UpdateCrossFilter
- UpdateFilters
- UpdateParameters
- UpdateRuntimeFilters
- UpdateSageQuery
- UpdateTML
- getExportRequestForCurrentPinboard
Event types that can be triggered by the host application to the embedded ThoughtSpot app.
To trigger an event use the corresponding LiveboardEmbed.trigger or AppEmbed.trigger or SearchEmbed.trigger method.
If using React components to embed, use the format shown in this example:
const selectVizs = () => {
embedRef.current.trigger(HostEvent.SetVisibleVizs, [
"715e4613-c891-4884-be44-aa8d13701c06",
"3f84d633-e325-44b2-be25-c6650e5a49cf"
]);
};
You can also attach an Embed event to a Host event to trigger a specific action as shown in this example:
const EmbeddedComponent = () => {
const embedRef = useRef(null); // import { useRef } from react
const onLiveboardRendered = () => {
embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
};
return (
<LiveboardEmbed
ref={embedRef}
liveboardId="<liveboard-guid>"
onLiveboardRendered={onLiveboardRendered}
/>
);
}
Index🔗
Enumeration members🔗
AddColumns🔗
AddColumns:= "addColumns"
Add columns to the current search query.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
AskSage🔗
AskSage:= "AskSage"
Trigger Ask Sage for viz
Defined in : types.ts
Version : SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
liveboardEmbed.trigger(HostEvent.AskSage,
{vizId:'730496d6-6903-4601-937e-2c691821af3c'})
CopyLink🔗
CopyLink:= "embedDocument"
Trigger the Copy link action on a Liveboard or visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
object - to trigger the action for a specific visualization in Liveboard embed, pass in
vizId
as a key
liveboardEmbed.trigger(HostEvent.CopyLink)
liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger((HostEvent.CopyLink)
CreateMonitor🔗
CreateMonitor:= "createMonitor"
Trigger the Create alert action on a KPI chart in a Liveboard or saved Answer.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
an object with
vizId
as a key
liveboardEmbed.trigger(HostEvent.CreateMonitor {
vizId: '730496d6-6903-4601-937e-2c691821af3c'
})
searchEmbed.trigger(HostEvent.CreateMonitor)
Delete🔗
Delete:= "onDeleteAnswer"
Trigger the Delete action for a visualization in an embedded Liveboard, or a chart or table generated from Search.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
Liveboard embed takes an object with
vizId
as a key. Can be left empty if embedding Search or visualization.
liveboardEmbed.trigger(HostEvent.Delete, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
searchEmbed.trigger(HostEvent.Delete)
Download🔗
Download:= "downloadAsPng"
Trigger the Download action on charts in the embedded view.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
Deprecated : from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.swUse {@link DownloadAsPng}
liveboardEmbed.trigger(HostEvent.Download, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
embed.trigger(HostEvent.Download)
DownloadAsCsv🔗
DownloadAsCsv:= "downloadAsCSV"
Trigger the Download > CSV action on tables in the embedded view.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.DownloadAsCsv)
searchEmbed.trigger(HostEvent.DownloadAsCsv)
DownloadAsPdf🔗
DownloadAsPdf:= "downloadAsPdf"
Trigger the Download PDF action on an embedded Liveboard, visualization or Answer.
NOTE: The Download > PDF action is available on visualizations and Answers if the data is in tabular format.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
DownloadAsPng🔗
DownloadAsPng:= "downloadAsPng"
Trigger the Download > PNG action on charts in the embedded view.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
liveboardEmbed.trigger(HostEvent.DownloadAsPng,
{vizId:'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.DownloadAsPng)
searchEmbed.trigger(HostEvent.DownloadAsPng)
DownloadAsXlsx🔗
DownloadAsXlsx:= "downloadAsXLSX"
Trigger the Download > XLSX action on tables in the embedded view.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.DownloadAsXlsx)
searchEmbed.trigger(HostEvent.DownloadAsXlsx)
DrillDown🔗
DrillDown:= "triggerDrillDown"
Triggers a drill on certain points of the specified column Includes the following properties:
Defined in : types.ts
Version : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
- Parameter
-
points - an object containing selectedPoints/clickedPoints to drill to. For example, { selectedPoints: []}
- Parameter
-
columnGuid - Optional. GUID of the column to drill by. If not provided it will auto drill by the configured column.
- Parameter
-
autoDrillDown - Optional. If true, the drill down will be done automatically on the most popular column.
- Parameter
-
vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill in case of a liveboard.
searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
console.log(payload);
const clickedPoint = payload.data.clickedPoint;
const selectedPoint = payload.data.selectedPoints;
console.log('>>> called', clickedPoint);
searchEmbed.trigger(HostEvent.DrillDown, {
points: {
clickedPoint,
selectedPoints: selectedPoint
},
autoDrillDown: true,
});
})
// Works with TS 9.8.0 and above
liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
console.log(payload);
const clickedPoint = payload.data.clickedPoint;
const selectedPoint = payload.data.selectedPoints;
console.log('>>> called', clickedPoint);
liveboardEmbed.trigger(HostEvent.DrillDown, {
points: {
clickedPoint,
selectedPoints: selectedPoint
},
columnGuid: "<guid of the column to drill>",
vizId: payload.data.vizId
});
})
Edit🔗
Edit:= "edit"
Trigger the Edit action on a Liveboard or a visualization on a Liveboard.
This event is not supported in visualization embed and search embed.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
object - To trigger the action for a specific visualization in Liveboard embed, pass in
vizId
as a key.
liveboardEmbed.trigger(HostEvent.Edit)
liveboardEmbed.trigger(HostEvent.Edit, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
EditTML🔗
EditTML:= "editTSL"
Trigger the Edit TML action on an embedded Liveboard or saved Answers in the full application embedding.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.EditTML)
Explore🔗
Explore:= "explore"
Trigger the Explore action on a visualization.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
an object with
vizId
as a key
liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
ExportTML🔗
ExportTML:= "exportTSL"
Trigger the Export TML action on an embedded Liveboard or Answer.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.ExportTML)
GetAnswerSession🔗
GetAnswerSession:= "getAnswerSession"
Get the answer session for a Search or Liveboard visualization.
Defined in : types.ts
Version : SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
const {session} = await embed.trigger(
HostEvent.GetAnswerSession, {
vizId: '123', // For Liveboard Visualization.
})
const {session} = await embed.trigger( HostEvent.GetAnswerSession )
GetFilters🔗
GetFilters:= "getFilters"
Get details of filters applied on the Liveboard. Returns arrays containing Liveboard filter and runtime filter elements.
Defined in : types.ts
Version : SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
console.log('data', data);
GetIframeUrl🔗
GetIframeUrl:= "GetIframeUrl"
Get iframe URL for the current embed view on the playground. Developers can use this URL to embed a ThoughtSpot object in apps like Salesforce or Sharepoint.
Defined in : types.ts
Version : SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
const url = embed.trigger(HostEvent.GetIframeUrl);
console.log("iFrameURL",url);
GetParameters🔗
GetParameters:= "GetParameters"
Triggers GetParameters to fetch the runtime parameters
liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
console.log('parameters', parameter);
});
Defined in : types.ts
Version : SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
GetTML🔗
GetTML:= "getTML"
Get TML for the current search.
Defined in : types.ts
Version : SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
console.log(
tml.answer.search_query // TML representation of the search query
);
})
GetTabs🔗
GetTabs:= "getTabs"
Get tab details for the current Liveboard.
Defined in : types.ts
Version : SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
console.log(
tabDetails // TabDetails of current LB
);
})
LiveboardInfo🔗
LiveboardInfo:= "pinboardInfo"
Trigger the Show Liveboard details action on an embedded Liveboard.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.LiveboardInfo)
MakeACopy🔗
MakeACopy:= "makeACopy"
Trigger the Make a copy action on a Liveboard, visualization, or Answer page.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.MakeACopy)
liveboardEmbed.trigger(HostEvent.MakeACopy, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.MakeACopy)
searchEmbed.trigger(HostEvent.MakeACopy)
ManageMonitor🔗
ManageMonitor:= "manageMonitor"
Trigger the Manage alerts action on a KPI chart in a visualization or saved Answer.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
an object with
vizId
as a key
liveboardEmbed.trigger(HostEvent.ManageMonitor, {
vizId: '730496d6-6903-4601-937e-2c691821af3c'
})
searchEmbed.trigger(HostEvent.ManageMonitor)
vizEmbed.trigger(HostEvent.ManageMonitor)
ManagePipelines🔗
ManagePipelines:= "manage-pipeline"
Trigger the Manage pipelines action on an embedded visualization or Answer. Allows users to manage ThoughtSpot Sync pipelines.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
an object with
vizId
as a key
liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.ManagePipelines)
Navigate🔗
Navigate:= "Navigate"
Navigate to a specific page in the embedded ThoughtSpot application.
This is the same as calling appEmbed.navigateToPage(path, true)
Defined in : types.ts
Version : SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1.sw
- Parameter
-
path
- the path to navigate to to go forward or back. The path value can be a number; for example,1
,-1
.
appEmbed.navigateToPage(-1)
OpenFilter🔗
OpenFilter:= "openFilter"
Open the filter panel for a particular column. Works with Search and Liveboard embed.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
- Parameter
-
{ columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }
searchEmbed.trigger(HostEvent.OpenFilter,
{ columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
LiveboardEmbed.trigger(HostEvent.OpenFilter,
{ columnId: '<column-GUID>'})
Pin🔗
Pin:= "pin"
Trigger the Pin action on an embedded object
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
Liveboard embed takes the
vizId
as a key. Can be left undefined when embedding Search, full app, or a visualization.
appEmbed.trigger(HostEvent.Pin)
searchEmbed.trigger(HostEvent.Pin)
Present🔗
Present:= "present"
Trigger the Present action on a Liveboard or visualization
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
- Parameter
-
object - to trigger the action for a specific visualization in Liveboard embed, pass in
vizId
as a key
liveboardEmbed.trigger(HostEvent.Present)
liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger((HostEvent.Present)
Remove🔗
Remove:= "delete"
Trigger the Delete action for a Liveboard.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
appEmbed.trigger(HostEvent.Remove)
RemoveColumn🔗
RemoveColumn:= "removeColumn"
Remove a column from the current search query.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
ResetLiveboardPersonalisedView🔗
ResetLiveboardPersonalisedView:= "ResetLiveboardPersonalisedView"
Trigger reset action for a personalized Liveboard view.
Defined in : types.ts
Version : SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
ResetSearch🔗
ResetSearch:= "resetSearch"
Reset search operation on the Search or Answer page.
Defined in : types.ts
Version : SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
searchEmbed.trigger(HostEvent.ResetSearch)
appEmbed.trigger(HostEvent.ResetSearch)
Save🔗
Save:= "save"
Trigger the Save action on a Liveboard or Answer. Saves the changes.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
liveboardEmbed.trigger(HostEvent.Save)
searchEmbed.trigger(HostEvent.Save)
Schedule🔗
Schedule:= "subscription"
Trigger the Schedule action on an embedded Liveboard.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.Schedule)
SchedulesList🔗
SchedulesList:= "schedule-list"
Trigger the Manage schedule action on an embedded Liveboard
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.ScheduleList)
Search🔗
Search:= "search"
Triggers a search operation with the search tokens specified in
the search query string.
Supported in AppEmbed
and SearchEmbed
deployments.
Includes the following properties:
Defined in : types.ts
- Parameter
-
searchQuery
- query string with search tokens - Parameter
-
dataSources
- Data source GUID to Search on-
Although an array, only a single source is supported.
-
- Parameter
-
execute
- executes search and updates the existing query
searchembed.trigger(HostEvent.Search, {
searchQuery: "[sales] by [item type]",
dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
execute: true
});
SetActiveTab🔗
SetActiveTab:= "SetActiveTab"
Set a Liveboard tab as an active tab.
Defined in : types.ts
Version : SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
- Parameter
-
tabId - string of id of Tab to show
liveboardEmbed.trigger(HostEvent.SetActiveTab,{
tabId:'730496d6-6903-4601-937e-2c691821af3c'
})
SetHiddenTabs🔗
SetHiddenTabs:= "SetPinboardHiddenTabs"
Set the hidden tabs on a Liveboard.
Defined in : types.ts
Version : SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
- Parameter
-
an array of the IDs of the tabs to hide. The IDs not passed will be shown.
liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
'630496d6-6903-4601-937e-2c691821af3c',
'i547ec54-2a37-4516-a222-2b06719af726'])
SetVisibleTabs🔗
SetVisibleTabs:= "SetPinboardVisibleTabs"
Set the visible tabs on a Liveboard.
Defined in : types.ts
Version : SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
- Parameter
-
an array of ids of tabs to show, the IDs not passed will be hidden.
liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
'430496d6-6903-4601-937e-2c691821af3c',
'f547ec54-2a37-4516-a222-2b06719af726'])
SetVisibleVizs🔗
SetVisibleVizs:= "SetPinboardVisibleVizs"
Display specific visualizations on a Liveboard.
Defined in : types.ts
Version : SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
- Parameter
-
An array of GUIDs of the visualization to show. The visualization IDs not passed in this parameter will be hidden.
liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
'730496d6-6903-4601-937e-2c691821af3c',
'd547ec54-2a37-4516-a222-2b06719af726'])
Share🔗
Share:= "share"
Trigger the Share action on an embedded Liveboard or Answer.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
liveboardEmbed.trigger(HostEvent.Share)
searchEmbed.trigger(HostEvent.Share)
ShowUnderlyingData🔗
ShowUnderlyingData:= "showUnderlyingData"
Trigger the Show underlying data action on visualization or search
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
an object with vizId as a key
liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.ShowUnderlyingData)
searchEmbed.trigger(HostEvent.ShowUnderlyingData)
SpotIQAnalyze🔗
SpotIQAnalyze:= "spotIQAnalyze"
Trigger the SpotIQ analyze action on visualization or search.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
Liveboard embed takes
vizId
as a key. Can be left undefined when embedding Search or visualization.
liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.SpotIQAnalyze)
searchEmbed.trigger(HostEvent.SpotIQAnalyze)
SyncToOtherApps🔗
SyncToOtherApps:= "sync-to-other-apps"
Trigger the Sync to Other Apps action on an embedded visualization or Answer Sends data from an Answer or Liveboard visualization to third-party apps such as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
an object with vizId as a key
liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.SyncToOtherApps)
SyncToSheets🔗
SyncToSheets:= "sync-to-sheets"
Trigger the Sync to Sheets action on an embedded visualization or Answer Sends data from an Answer or Liveboard visualization to a Google sheet.
Defined in : types.ts
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
- Parameter
-
an object with
vizId
as a key
liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
'730496d6-6903-4601-937e-2c691821af3c'})
vizEmbed.trigger(HostEvent.SyncToSheets)
UpdateCrossFilter🔗
UpdateCrossFilter:= "UpdateCrossFilter"
Trigger cross filter update action on a Liveboard
Defined in : types.ts
Version : SDK: 1.29.0 | Thoughtspot: 10.0.0.cl
liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
vizId: 'b535c760-8bbe-4e6f-bb26-af56b4129a1e',
conditions: [
{ columnName: 'Category', values: ['mfgr#12','mfgr#14'] },
{ columnName: 'color', values: ['mint','hot'] },
],
});
UpdateFilters🔗
UpdateFilters:= "updateFilters"
Update one or several filters applied on a Liveboard.
Defined in : types.ts
Version : SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
- Parameter
-
filter
: a single filter object containing column name, filter operator, and values. - Parameter
-
filters
: multiple filter objects with column name, filter operator, and values for each.
Each filter object must include the following attributes:
column
- Name of the column to filter on.
oper
- Filter operator, for example, EQ, IN, CONTAINS.
For information about the supported filter operators,
see Developer Documentation.
values
- An array of one or several values. The value definition on the
data type you choose to filter on. For a complete list of supported data types,
see
Supported
data types.
type
- To update filters for date time, specify the date format type.
For more information and examples, see Date filters.
liveboardEmbed.trigger(HostEvent.UpdateFilters, {
filter: {
column: "item type",
oper: "IN",
values: ["bags","shirts"]
}
});
liveboardEmbed.trigger(HostEvent.UpdateFilters, {
filter: {
column: "date",
oper: "EQ",
values: ["JULY","2023"],
type: "MONTH_YEAR"
}
});
liveboardEmbed.trigger(HostEvent.UpdateFilters, {
filters: [{
column: "Item Type",
oper: 'IN',
values: ["bags","shirts"]
},
{
column: "Region",
oper: 'IN',
values: ["West","Midwest"]
},
{
column: "Date",
oper: 'EQ',
values: ["2023-07-31"],
types: "EXACT_DATE"
}]
});
UpdateParameters🔗
UpdateParameters:= "UpdateParameters"
Triggers Update RuntimeParameters for answers and liveboard
Defined in : types.ts
liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
name: "Color",
value: "almond"
}])
@version SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
UpdateRuntimeFilters🔗
UpdateRuntimeFilters:= "UpdateRuntimeFilters"
Update runtime filters applied on a Saved Answer or Liveboard. The runtime filters passed here are appended to the existing runtime filters. Pass an array of runtime filters with the following attributes:
columnName
String. The name of the column to filter on.
operator
Runtime filter operator to apply. For information,
see Developer Documentation.
values
List of operands. Some operators such as EQ, LE allow a single value, whereas
operators such as BW and IN accept multiple operands.
Note: HostEvent.UpdateRuntimeFilters
is not supported in
Search embedding (SearchEmbed) and Natural Language Search
embedding (SageEmbed).
Defined in : types.ts
Version : SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
- Parameter
-
{@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
{columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
{columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
])
UpdateSageQuery🔗
UpdateSageQuery:= "updateSageQuery"
Updates the search query string for Natural Language Search operations.
Defined in : types.ts
Version : SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
- Parameter
-
queryString
: Text string in Natural Language format - Parameter
-
executeSearch
: Boolean to execute search and update search query
sageEmbed.trigger(HostEvent.UpdateSageQuery, {
queryString: 'revenue per year',
executeSearch: true,
})
UpdateTML🔗
UpdateTML:= "updateTSL"
Trigger the Update TML action on an embedded Liveboard.
Defined in : types.ts
Version : SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.UpdateTML)
getExportRequestForCurrentPinboard🔗
getExportRequestForCurrentPinboard:= "getExportRequestForCurrentPinboard"
Get the transient state of a Liveboard as encoded content. This includes unsaved and ad hoc changes such as Liveboard filters, runtime filters applied on visualizations on a Liveboard, and Liveboard layout, changes to visualizations such as sorting, toggling of legends, and data drill down. For more information, see Liveboard data with unsaved changes.
Defined in : types.ts
Version : SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
data=>console.log(data))