Home › Forums › KX Solutions › Dashboards – action triggers on page load › Re: Dashboards – action triggers on page load
-
Hi Nick,
Using the following as an example:
When I come to the dashboard, the text viewstate is present. There is a virtual query however it does not wipe this viewstate.
When I press clear, it activates the viewstate and clears the text.
If I refresh the screen, the default text “Hello World” is present:
or if I click reset text it will add “Hello World (again):
Button Actions
Virtual query
Result
Output mapping
Unfortunately I’m not able to attach json (example dashboard) on the Community portal yet, however I’ll drop you an email to see if it helps solve your issue.
Kind regards,
David
—
Virtual Query
function (source, enabled, callback) { var result = { meta: { k:11, v:11 }, columns: [ "k", "v" ], rows: [] }; if(enabled) { console.log('Clearing viewstates'); result.rows = [ {k:'text', v:null}, {k:'triggerEnabled', v:false} ]; } else { console.log('Returning current'); result.rows= [ {k:'text', v:source}, {k:'triggerEnabled', v:enabled} ]; } callback(result); }