Skip to main content
Nintex Community Menu Bar
Question

getSelectedItems in a custom button

  • July 9, 2024
  • 3 replies
  • 3 views

Forum|alt.badge.img+1

So I have my row(s) highlighted in/on model using a row action to addClass() and that part works great.

The next thing is to pull the selected row or rows from any given model so what script do I need to use to get the .list.getSelectedItems()

3 replies

Forum|alt.badge.img+9

If you mean using a mass action, you can use this to get the Ids :

var Ids = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){    
return item.row.Id;
});



Forum|alt.badge.img+1

I almost called the post pseudo mass action however the trick is doing multiple different models on a page so looking to get to the list(s) from possibly various sources 

Perhaps understanding how the list gets built would be beneficial ??


Forum|alt.badge.img+8

Hi Jerry,

There could me multiple lists attached to a particular model, so you’d have to iterate over each one.

Check out the registeredLists property on the model described here.

http://help.skuidify.com/m/11720/l/205447-skuid-model-model

Here is a code snippet that should log each of the selected items on all lists for a model.

skuid.$.each(myModel.registeredLists,function(){<br>&nbsp; &nbsp; console.log(this.getSelectedItems());<br>});