save just one row in table

  • 1
  • Question
  • Updated 1 month ago
  • Answered
Is there a way to save just the selected row from a row action?

I have a situation where a user is entering values in a table that is in edit mode, and as they go down the list, they may encounter a situation where they need to save just one row in the table, without saving the whole model, because we want to refresh the model to show new child records, and save that row, but can't save the whole model due to required fields not being filled out. 
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Could you create a separate model based on the same object then as part of your row action sequence activate and set value of a condition equal to the id of the row in context then save that model instead? Then that model would only have the row in question upon save.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Not quite. The changes would still be in the original model. You'd have to use a javascript snippet to query then puch the related changes into the new model.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Drats, Foiled! But I will not give up that easily. What if after you set and activate the condition on the secondary model, you use update fields on rows to populate what would be the only row in the secondary model with the values from the row in context from the primary model?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Yes, you could do this and have a field update action for every field in the primary model. That way it's within normal skuid functions without any javascript hackery. Just have to remember to have a field update added for each field in the primary model.

Personally, I'd like to be able to adopt row that takes in the row changes along with it. But, alas this functionality has not yet made it to the top of the very very long list of features to come.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I like the way you guys think.  Thanks for brainstorming a solution. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
This needs to be converted to an idea. I'd love the ability to save or cancel a single row. I'd use this straight away in the List & Card component we're developing.
Photo of Olya Slyusar

Olya Slyusar

  • 120 Points 100 badge 2x thumb
Is it possible to change the mode of that "saved" row back to read and leave the "unsaved" rows in edit mode as part of this action sequence?
Photo of Arne-Per Heurberg

Arne-Per Heurberg

  • 1,336 Points 1k badge 2x thumb
did this ever make it high enough on that stack of functionality?