Skip to main content

I have a popup that happens from an action sequence. The popup appears to be unaware of its context. I manually call it using a html a href link with javascript from a template field in a table row using javascript:skuid.actionSequences.getByName('ActionSequence').run({'Id':'{{{Id}}}'});


A workaround I’m trying to do is pass the ID to the action sequence, which then updates a UI model’s field “SelectedRow”, then I’m trying to use the Id = that ID in that model, but I can’t use “field from another model” in the context here. Is there a way to do this with the XML? Or some other way I can pass context to my popup using this method? I want people to be able to click on a specific field and have that open a popup with particular context/settings to edit not that field, but a related field on the row.


If anyone has any ideas it would be very helpful. Thanks!

I think I’m following this….

-Instead of using a UI only model in your sequence, add a second model on the same object as your source model and call it “Selected Record” and add the field: Id

-Set it to not query on page load and max record of 1 and don’t create a row by default.

-Create a condition on that model that sets Id to a specified value and leave that value blank.

-Set the model to on by default


Then, in your action sequence use the activate and set value of condition. Set the value of the condition on the “SelectedRecord” model to the Id of the record in context. Then query the selected record model.


This should result in a single record in the selected record model that you can then reference with merge syntax {{$Model.SelectedRecord.data.0.Id}}


I thought about doing it that way – I was hoping not to because it requires additional database querying on multiple models slowing down the process (one query to get the single row out, a save, a query on the full model that contains the row to update it, then post-processing to update the newly queried full model)


If there’s another way to be able to work with a single row in my existing model using context somehow that would be ideal.


Perhaps I can adopt the row into another model, edit it, and then update the corresponding row on the original model based on what got edited then save changes in the original model? I’ll play around with that a bit and see where I get…


Thanks for the ideas!


The adopt row, edit adopted row, and update original row based on adopted row data method (using javascript) seems to work without having to run additional queries.


Reply