Runtime filters | HP
I have created the ThoughtSpot Embed application using angular i want clear the runtime filters of the liveboard.. what the logic to do this
8 Replies
hey @Sathish , are you share a snippet how you are currently using runtime filters
To update the runtime filters you can use an host event : https://developers.thoughtspot.com/docs/Enumeration_HostEvent#_updateruntimefilters
More info about runtime filters :
https://developers.thoughtspot.com/docs/runtime-filters#_runtime_filters_in_visual_embed_sdk
var columnName1 = '';
var data1 = '';
var liveboardId = ''
this.route.queryParams.subscribe(params => {
data1 = params['COGID'];
liveboardId = params['liveboard'];
data1=data1.replace(/-/g, '').toUpperCase();
console.log(data1);
});
const tsDiv = document.getElementById("TSDIVV") as HTMLDivElement;
const appEmbed = new LiveboardEmbed(tsDiv, {
frameParams: {
width: '100%',
height: '100%',
},
liveboardId: liveboardId,
showLiveboardTitle:true,
showLiveboardDescription:true,
runtimeFilters: [{
columnName: "COG ID",
operator: RuntimeFilterOp.EQ,
values: [data1]
}]
});
appEmbed.on(EmbedEvent.Init, showLoader)
.on(EmbedEvent.Load, hideLoader)
.on(EmbedEvent.AuthLogout, this.showLogoutExpired)
.on(EmbedEvent.AuthExpire, this.showLogoutExpired)
.render();
whe the liveboard load it will set the cog id runtime filter
when ever i want to navigate to other liveboard i want to remove the runtime filters
@Sathish how are you navigating to another liveboard ?
were you able to use the HostEvent ?
no am not using HostEvent
when the user is clicking the custom navigation menu at that time am passing the liveboardid
@Sathish As per my understanding
you want runTimeFilters of some of the liveboards and it should be empty in rest of the liveboards
if so this can be handled in queryParams.subscribe itself. you can conditionally pass runtimeFilters based on the liveboard id
cc: @suhel4code
yes your understanding is correct
how to do it conditionally pass runtimeFilters based on the liveboard id
@Sathish
Can we check conditionally where to pass runtime or not ? In the meantime I will find better solution for this
Can we check conditionally where to pass runtime or not ? In the meantime I will find better solution for this