Is there any tutorials on Row Actions / Mass Actions?
Skuid Skool doesn’t seem to have any.
Documentation searches all seem to send me to v1 javascript which don’t apply to v2.
The documentation seems to assume things which I’m either not understanding, or aren’t documented. I’m also bumping into lots of dated or dead links related to this. Search the docs for “Mass Actions” and the first link is context and its a dead 404 link.
I think some of my problem is understanding what, really, does context mean? From: Context — Skuid v15.3.5 Documentation
Mass actions
Mass actions allow an end user to select one—or more—rows and perform an action on them. ?>Each selected row becomes context for the action.
That doesn’t mean what I thought it meant. I was expecting to be able to reference the model.field in actions, and it would have the data for the ‘current’ selected row. Instead the model is always the value for the current first row in the table.
From another community question answer, it seems you access the context via the {{merge syntax}}. I’m able to get a row action to access the specific row data, by merging setting a field (in a model condition) to a specific value, and the value is the merge field.
So I then expected that to work in the mass-action actions. But no, It’s always merging the value from the model/first row in the table. Not the selected ones.
As an example, I made a mass-action called ‘ToastIt’. The action is only display toast, with a field merged from the row. I was expecting to see multiple toast messages if I selected multiple rows… However only one toast shows, and only with the value of the first/top row/model value. Not any of the selected rows.
In the case where the Mass-Action is instead called once for the ‘batch’ of selected rows, I was expecting to be able to do ‘setup actions’ (update model conditions, query models, etc), then have some action like Mass-Update-Action, with sub-actions for each selected row, then ‘closing’ actions after each row was processed, like save changes for multiple models.
But mass-update takes over the UI to manually change values…
…
So is there a tutorial for Mass-Actions? Apparently v1 did what I wanted as it has docs on dropping to javascript and looping over the selected records/rows. But that’s not in v2…