Hi
here is my query triggered by a button
js_categories.trigger();
js_Columns.trigger();
js_Entities.trigger();
var CurrentYear_data;
query_eurex_conso.trigger( {
additionalScope: {
theCategories:js_categories.data,
theColumns:js_Columns.data,
theEntities:js_Entities.data,
theYear: year.value},
onSuccess: function(data) {
return data;
},
onFailure: function(error){
console.log(error);
}
});
CurrentYear_data=Object.assign({}, query_eurex_conso.data);
query_eurex_conso.trigger({
additionalScope: {
theCategories:js_categories.data,
theColumns:js_Columns.data,
theEntities:js_Entities.data,
theYear: (year.value-1)},
onSuccess: function(data) {
state_LastYearData.setValue( data);
//return data;
},
onFailure: function(error){
console.log(error);
}
});
return CurrentYear_data;
Basically I launched twice the same query. First for the current year, then for the last year.
I want to display the of current year in a table and store the the data of last year in a temporary state.
if I launch multiple time that piece of code, my table displays the data of, either the current year or the last year !
What do I miss ?
thank in advance for your help.