Updating the payload data with an Input Control Block

I’m using an Input Block in my Dashboard to update the email element. I need the email on the payload to change to the email being submitted from the Input( Where ‘hiwrongemail@gmail.com’ is).

This is my submit button payload:

When I submit a new email. No change is made to the payload and the original email is still being used ('hiwringemail@gmail.com").

This is my workflow:

If you need to know more information please let me know.

The most important concept to keep in mind is that every workflow run is completely independent from all other workflow runs. The trigger that started the workflow creates an entirely new payload on each execution. The payload that the trigger creates depends on the specific trigger.

From your screenshot, you appear to be reporting an email address via device state, which is causing the Device: State Trigger to run this workflow with whatever value was reported by the device (i.e. hiwringemail@gmail.com).

You then also have a Virtual Button Trigger being invoked with a different email address (i.e. hiwrongemail@gmail.com).

These two triggers and the payloads they create are independent from one another. Invoking the Virtual Button has no affect on the data being reported by the device, which is why you don’t see any behavior change.

There are a couple of options based on how you intend for your application to work:

  1. When the Virtual Button is pressed, send a Device Command to the device to change the value it’s reporting.
  2. When the Virtual Button is pressed, save the new email address to Workflow Storage. When the device then reports state, get the email from storage.
1 Like