Is it possible to only have an action step run when an input has changed

I know there is a workflow run when an input has changed, but is it possible to have specific action steps only run when an input has changed?

Problem is I have about 20 multiline inputs and rather than having a workflow that saves them all each time I just want them to save singularly when a change has been made to anyone of them, i.e. it only saves the one that has changed.

Is that possible?

Unless I misunderstand your questions, that’s exactly how it works.

Here I have two actions based on changing two different inputs, along with starting another action to be triggered by an input being changed:

Specify the input element that you want to respond to:

image

It even works when the page is closed and an input is sitting on an unprocessed change.

1 Like

Multiple ways to do this:

  1. You can always have 20 different events with 20 different workflows.

  2. Have 20 different events that trigger a single custom event with 20 steps in its workflow to change the individual fields. Then add a condition on each step that says 'this input does not equal this things field's value'. That will prevent the step from running unless the correlating input’s value has changed.

  3. Use a single Do when condition is true and create a monster condition 'When input A's value <> Thing's field A's value or input B's value <> Thing's field B's value' etc until you’ve accounted for all your inputs and have it trigger a single custom event with 20 steps in its workflow to change each field. Then add a condition on each step that says 'this input does not equal this things field's value'.

  4. Use the autobind feature.

2 Likes

Yes, but it isn’t the workflow that I want to run it is the individual step Laurence. So in that last screengrab you did, where it says ‘Only when’, that is the bit I want to use to check for a change.

I know I could have dozens of individual workflows and possibly doing it, but I using the Encoding/Decoding plugin as I need to encrypt what is being written to the data type, and that seems to be causing some odd issues with the ‘On’y when’ workflow, and also seems to create some kind of delaying between encoding and then saving - or Bubble is causing a slight delay. This is meaning some times nothing is getting written to the data type even though their is clearly something in the multiline input element.

Sorry for the long winded explanation, but I wanted to try and make more sense that I did in my original post.

I have managed to get the whole thing working, but to do so I have had to insert pauses between the encoding of each multiline element (there are about 20) and also split the saving to data type into three steps each with six or seven fields in, and have pauses between each step.

But, even though I have it working it means it is taking between 10 and 20 seconds to do it and that is a bad user experience. So I figured if I could have the pauses as conditional, based on whether an element actually needs saving, then I could streamline the whole routine and get it down to between 2 and 5 seconds.

Does that make sense?

I feel like there has to be a more elegant solution, but I’ve been trying to get this save routine working for 2 days and desperate to get it sorted so I can move on with other things.

Thanks for those suggestion Eli.

I tried option 1, but having some weird issue with a workflow running when a change has been made (may be due to me using the Encode/Decode plugin prior to writing everything, but still trying to figure out why)

Options 2 and 3 are something I will give a go, but I think there might be an issue as the content in the data type is encoded and so I’d struggle to compare it as I think it would need to run via the decoder first.

Option 4 won’t work in this case as the contents of the multiline input are being encoded prior to saving and so need to run via a workflow.

I’m slowly getting there via the use of several workflows and inserting a LOT of pauses in between steps, but it is making the save routine way too long, and so I wanted to make each of the steps conditional, including the pauses. That way, only the steps that needed to run would run and the rest would be skipped.

Thanks for your food for thought though. It is all a big help in pushing me in the right direction.

That will certainly complicate the situation. Could you put a small save button by each input that is hidden and only shows when that field needs to be saved?

If that’s an option, you could create a custom state on each input and set it when you are initially decoding that fields value to display in the input.

Then put a condition on the save button that says when this input’s value is not this input’s custom state’s value this element is visible.

That would show the button only when the input has been changed. On save you would reset the inputs custom state to the inputs current value and the button would disappear.

Good luck with it!

Is autobinding an option?

Unfortunately, autobinding won’t work as it is relying on a workflow to encode the content before saving it. Shame, as that would have been the best solution.