Embedded widget in a experience Page

Hi Losant Team!

i’m working in a experience page with custom HTML and i want to set a ctx.deviceId variable on a widget.
I send the deviceID in the pageData that a workflow reply me but i don’t know how to give it to the widget to use and grab data for me. I was reading the documentation but im not sure if this is possible.

if helps my page looks like this

Thanks :slight_smile:

I’m assuming the “widget” is a Losant dashboard? If so, you can use the element helper to display the dashboard on your page and define context variables:

{{element 'dashboard' dashboardId=YOUR_DASHBOARD_ID ctx=(obj deviceId=pageData.yourDeviceId)}}

More details can be found here:

1 Like