Receiving data from range slider in dashboard

Hello, I am having issues getting the data from the slider object in a dashboard. Currently, I have added a slider({{range-0}} and a submit button that sends a payload with the following to a workflow:
{

“range-0”: “{{range-0}}”

}

I want to receive the number that the user has submitted and display it in a gauge block in the same dashboard that is permanently stored until the user changes it again. How would I go about doing this? Here are some screenshots of what I have so far.




Thank you!

Hey @Jackson_Miller,

When you’re using an Input Control block to trigger a workflow with a Virtual Button, you don’t actually have to put anything in the example configuration of the Virtual Button.

Once you have your Input Control Block set up, I would highly recommend putting a Debug Node at the end of the flow with the Virtual Button. This will allow you to see your workflow context at that point in your workflow.

For example, I have this input control block:

image

Here’s its configuration:

Then I’ve got this workflow with a Virtual Button named “Click this one” and a debug node:

image

Then in my debug panel, once I click the submit button on my Input Control Block, you can see the value you sent in the data object of the debug message:

Note: this will require you to have the dashboard open in one tab and the workflow open in another tab.

You can read more about the Input Control Block in our documentation.

Now, for displaying that data in a gauge block on the same page…

Dashboards display data from Device State. So, to display the value that has been submitted via the Input Control block, you can create a Device, then use a Device: State Node to report the state of that device with that value from the Input Control Block.

Then, in your Gauge Block, you can configure the block as follows:

With the data type set to Historical, Duration set to Last Received Data Point, and the attribute aggregation set to Last.

This setup will, though, require you to refresh the dashboard after you press the button if you would like to immediately see the change. Otherwise, the change will show once the Dashboard Refreshes.

Let me know if this helps!

Thank you,
Heath

1 Like

Great, thank you very much Heath! Everything is working as expected.

1 Like