Skip to main content
Nintex Community Menu Bar
Question

Does the RemoveRowbyId method work for Ui only models when an Id/ExternalKey field is selected in th

  • July 11, 2024
  • 2 replies
  • 12 views

Forum|alt.badge.img+1

I am trying to remove a row in a Ui only model based on an Id field. The JavaScript completes successfully, but the row is not deleted. What am I missing?

8c5b305ffd6426bac67cda377f6d485fd8bad854.png

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+13

Hmm, I’m not sure exactly why this wouldn’t be working, but I suspect that the issue is that the Ui-Only Model’s row Id isn’t the same as it’s “Id” field value. You might try finding the row to remove by finding the model row with a specific field value, and then using abandonRow(), which takes a row as an argument rather than a field, like this:

var rowToRemove = mod.getRows().find(function(row) {
    console.log("row.Id = " + row.Id);
    return row.Id === caseId;
});

if (rowToRemove) {
    mod.abandonRow(rowToRemove);
}


Forum|alt.badge.img+1
  • Author
  • July 11, 2024

That seemed to work. Thank you!