Jump to content

Marking.onChange (JavaScript API) method does not get triggered


Georgi Koemdzhiev

Recommended Posts

I am trying to understand why the Marking.onChanged method does not get triggered. These are the steps that I go through after I add the code at the bottom to my page:

1. Open an analysis document on the WebPlayer

2. Mark some items on a scatter plot

3. Inspect the browser console

this.app.onOpened((document) => {

document.marking.onChanged("Marking", "Wells", ["wellID"], 10, (marking) => {

// that line below does not get triggered

console.log("Test key: " + marking.key);

});

});

Link to comment
Share on other sites

  • 4 weeks later...

You need to have a function(array) as the call back.

this.app.onOpened((document) => {

document.marking.onChanged("Marking", "Wells", ["wellID"], 10, function(array){

console.log("Test key: " + arrary[0]);

})

});The documentation shows

function onChanged(markingName, dataTableName, dataColumnNames, maxRows, callback);with the callback being a function that returns an array.

https://docs.tibco.com/pub/sfire_dev/area/doc/api/TIB_sfire_Web_Player_JavaScript_API_Reference/html/M_spotfire_webPlayer_Marking_onChanged.htm_ga=2.247650823.1859367710.1576688302-1235101339.1574092729

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...