Hi everyone, I have an interesting issue… I have a table that is dynamically filled by a variable and contains inputs. I created the ability to change the order of the rows with a couple of workflows/buttons, but I quickly realized that if an input has been filled, that input does not move with the rest of the row (or perhaps it’s more accurate to say that the data inputted does not move).
Check out the image below. The up down arrows will move the row of data as expected, but the highlighted value will not move. Any ideas on how to fix?
I did something similar to track the values, but the I need to actually be able to set the value of inputs, not just track them.
For example, if the second row of data has the ‘artist name override’ field filled, and I move that row of data up, I need to wipe the second row’s ‘artist name override’ field and set the first row’s ‘artist name override’ field to the previous value from the second row. I know how to keep track of the value, I don’t know how to wipe/set values of inputs in specific rows.
It would be a little more complicated logic, this would require some engineering, which is a little out of scope of the community I guess. But As Mariano mentioned in the thread he sent, you can track it like that and then manipulate it via some custom JS I think. You could either use copilot or get someone to do this.
If you keep track of the values you can also assign them to the inputs. Simply bind the “initial value” property to the variable where you store the change. It’s all doable with nocode.
See this example where you can keep track of a list of checkboxes, but also change their value dynamically.
I think you could work with an array and their indexes, for example the relationship of index of your selectedRow and the input value index within an array storing all the values. Or you might bind the values via the id, so you can call it then via id.
I found a very simple way, not the best, but simple. You can still access the data via the dot notation, it just doesn’t show in the editor visually sometimes.
Edit: I also made it work on the datagrid, so this should be doable)
Indeed, you can make this happen in nocode for sure, but I’ve rather used some js as well, it just comes faster to me) Sometimes I find the formulas too complicated haha! I can’t see what’s happening underneath, so I’m like, rather using js.
Thanks so much guys! There is indeed multiple ways to do this.
It ended up being really easy to implement. Since I already had an object that tracks the inputs, I just added a dynamic init value to the inputs as shown: