How to send data to analytic connection / SSE with a click of a button ?
I can't figure out how to get a button that will function as a trigger to call a function exposed by an analytic connection engine (called also SSE engine). I am struggling with the Set Variable action in the button and variables and expressions to this end, but nothing seems to work and I have no more ideas, probably I'm doing sth wrong.
What I have so far is that the function is called when the selection changes but this is undesirable.
I need a button with an action, so the user can trigger this action (i.e. send some data to the SSE) only one-off each time the button is clicked.
I know the topic is old, but here's my grain of salt:
You can create a measure which uses your variables as part of the expression and assign it to a KPI. The variables used in the expression only change when you press the button. You can use more variables that change without pressing the button. If you need their values for your call to the SSE, you will have to copy the values to the SSE-call-related variables with the button action.
Every time the expression for the measure of the KPI yields a different value, the SSE will be called. Also, take into account that the requests to the SSE are usually cached, so, if you try calling the same function with the same parameters twice, it will not necessarily invoke the SSE. This might fulfill your goal of only calling the SSE when the button is pressed.
However, if you need to guarantee that the SSE will be called whenever the button is pressed and only then, you will probably need to complicate things a bit, because every time you open the app and the KPI is shown, the SSE will be called if the expression for the measure references it. You'll also need a timestamp-like parameter to make sure your requests are not cached.