Snippet Update of UI Model Fields

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)

In earlier versions of Skuid, before 9.5, I could update fields in a UI Only model via a snippet. I could update fields in a snippet via the same updateRow function that we use for regular saleforce models. Now, and I've tried in both 9.5.12 and 10.0.4, I can no longer do this.  Here is a bit of the code that makes a new row in the UI only model (ConfigKitGroup1SelectorUI) and update the filed counter on it. 

var $ = skuid.$;
var models =;
var UISelectors = models.ConfigKitGroup1SelectorUI;

var Qty = 5
var count = 1;

while (Qty > 0){
    console.log('Adding Row to Group 1');
    var newRow = UISelectors.createRow({doAppend : true});
    { Id: newRow.Id },
        Counter: count

When running this it makes the rows, but doesn't update the counter field with the value. I've worked around this issue with a simple index reference but I'm wondering why I can no longer do something like this.

Photo of Andy Shipsides

Andy Shipsides

  • 440 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 32,410 Points 20k badge 2x thumb

Try the field updates as a single object in the first argument of the updateRow() call, like so:

        Id: newRow.Id,
        Counter: count