Facing issue in updating contact Mailing address into OtherAddress when onChange of checkbox

I need some help with this. I have a scenario when a checkbox is true, i want to update contact mailing adderss into other address. Here i did some extent. But not solved completely i am facing some issues.



Thanks in Advance.
 

Here is my code: var field = arguments[0], value = arguments[1], $ = skuid.$; field.element.html(skuid.ui.renderers.BOOLEAN.edit({ onChange : function(value){ var conRow = skuid.$M(‘Contact’).getRows()[0]; if(value) { conRow.OtherCity = conRow.MailingCity; conRow.OtherStreet = conRow.MailingStreet; conRow.OtherCountry = conRow.MailingCountry; conRow.OtherState = conRow.MailingState; conRow.OtherPostalCode = conRow.MailingPostalCode; } else { conRow.OtherCity = ‘’; conRow.OtherStreet = ‘’; conRow.OtherCountry = ‘’; conRow.OtherState = ‘’; conRow.OtherPostalCode = ‘’; } skuid.$M(‘Contact’).adoptRows( field.row, field.row); } }));

Not sure about the code, but if I’m understanding correctly, you should a able to do this with model actions. Create a model action triggered by the update of the contact address field. Have it update field on rows. Choose the other address field. Set its value to the value of the contact address field (you may need to use merge syntax.