This sample code adds data into a new row of a table, and copies values from other fields in the same App.
Make sure to match the Field code of your fields, with the Field code written in the code.
The button will be placed on the Blank Space field of the app. Make sure to match the Element ID of the Blank Space field with the Element ID written in the code.
Refer to the Tutorial page, on how to add scripts to your app.