To create a button in Coda that duplicates only visible rows in a table and overwrites specific field values, follow the steps given below:
- Open your Coda account
- Filter your table using <code> Filter() </code> to show only the rows you wish to duplicate
- Add a column to the table and insert a button
- Name the button 'Duplicate Row'
- Set Button Actions using <code>RunActions()</code> to define the actions
- Use <code>Table.AddRow()</code> to duplicate the row
- Use <code>ModifyRows()</code> within <code>AddRow()</code> to overwrite specific field values
- The button should reference <code>thisRow</code> to apply the action only to visible rows based on the filter
- Test the button