Skip to main content

Hi,


In a table I have set up a mass action to kind of ‘clone’ a row.


Often I would need this action to create multiple new rows using data from the row i selected mass action on (let’s call it original row). the first row created works flawlessly, but all the rows after that, do not get info from original row, they try to fetch it from new row created above.


Here’s my sequence action and the problem is that the first row gets info from original row perfectly.


Create new row

Add default value {{one_months_ago__c}}

Create new row

Add default value {{two_months_ago__c}}

Save changes in model


I tried specifying the row for merge value {{$Model.Bank_Statement.data.0.two_months_ago__c}} , but still not working.


If i put a save action in between each ‘create new row’ It kind of works but takes the info from newly created row instead of original, and it’s very slow , specially if need to create 12 new rows, could take 5 min+…


Any idea how i could force the default values to be always from the original row, on all the new rows?


Thx


Dave, 

Does this need to be in a mass action or would a row action work? If you are only cloning one row it sounds like a row action might be better suited for you, and you wouldn’t have the issue of “losing” the row you want to clone. 

Thanks!
Amy


Dave,

Anytime you use the create new row action, the context for the action framework is reset to the row you just created. The most reliable way around that which I’ve seen proffered on the community (I believe Pat got me into this method), is to set up a new model specifically to contain the row you’re interested in reusing. have an Id = ‘’ condition on it. Then your row action can set the value for that condition, query that model, and then reference that model with global merge syntax in all your new row creation steps. Does that make sense?


Hi Amy, Actually I tried with row action , and had same issue, as Matt explained below i guess it’s because: Anytime you use the create new row action, the context for the action framework is reset to the row you just created.

But thank you for your help


Thank you Matt, I understand logic and will try it out shortly

Thank you for the help 🙂


Oops, yep, I didn’t realize it would grab context even from row action. Sounds like Matt gave you a great option, though!