> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/copy-records.md).

# Copy Records

The Copy Records to Clipboard interaction copies data from selected Data Table rows directly to the user's clipboard.

## Overview

The Copy Records to Clipboards interaction is a specialized action available exclusively for the Data Table component. It allows users to copy information from selected table rows directly to their clipboard, making it easy to paste the data into other applications such as Excel, Google Sheets, or email.

<mark style="background-color:orange;">**Availability**</mark>**:** This interaction is available on Data Table components as both a **row action** and a **header action**. As a row action it copies the clicked row; as a header action it copies the selected rows, or all visible records when none are selected.

When users click a button or action configured with the Copy Records interaction, the system automatically copies the relevant data from the Data Table to the clipboard in a structured format (typically tab-separated or comma-separated values).

### **Key features**

* Copies data from all selected rows in the table
* Includes column headers for context
* Formats data for easy pasting into spreadsheet applications
* Works with single or multiple row selections
* Provides immediate feedback when the copy is successful

***

## Configuration

Copy Records requires no interaction-specific settings — as a row action it copies the clicked row, and as a header action it copies the selected rows (or all visible records when none are selected). Configuration consists of adding the action to a Data Table header.

### **Location**

Data Table component → Header Actions

1. Select your Data Table component on the canvas
2. In the properties panel, find the **Header Actions** section
3. Click **Add Action** or **New Header Action**
4. Choose **Copy Records** as the interaction type
5. Configure the action properties (label, icon, etc.)

{% hint style="warning" %}

#### Important

Copy Records is available on Data Table components as both a row action and a header action:

* As a **row action**, it copies the clicked row.
* As a **header action**, it copies the selected rows, or all visible records when none are selected.
  {% endhint %}

***

## Example

### **How users interact with Copy Records**

1. **Select rows** in the Data Table (single or multiple)
2. **Click the Copy Records action** in the table header
3. **System copies the data** to the clipboard
4. **Confirmation appears** (typically a toast message: "Records copied to clipboard")
5. **User pastes** the data into another application using Ctrl+V (Windows) or Cmd+V (Mac)

### **What gets copied**

* All visible columns from the selected rows
* Column headers (for context)
* Formatted as tab-separated or comma-separated values
* Hidden columns are typically excluded

***

## Important Considerations

Accessibility considerations when configuring Copy Records:

* **Keyboard access:** Ensure the copy action can be triggered via keyboard navigation (Tab + Enter)
* **Screen reader support:** Use descriptive labels that clearly indicate the action's purpose
* **Visual feedback:** Provide both visual (toast) and potentially auditory confirmation
* **Alternative methods:** Consider providing export options in addition to clipboard copying for users who may have difficulty with clipboard operations

***

## Troubleshooting

### Copy action doesn't appear

**Possible causes**

* Action not added as a Header Action
* Visibility conditions hiding the action
* Incorrect component type (not a Data Table)

**Solutions**

* Verify you're configuring Header Actions, not row actions
* Check visibility conditions to ensure they evaluate to true
* Confirm you're working with a Data Table component

***

### Nothing copied to the clipboard

**Possible causes**

* No rows selected in the table
* Browser permissions blocking clipboard access
* JavaScript errors preventing the action

**Solutions**

* Ensure at least one row is selected before clicking copy
* Check browser console (F12) for permission errors
* Grant clipboard permissions if prompted by the browser
* Test in a different browser to rule out browser-specific issues

***

### Copied data format is wrong

**Possible causes**

* Hidden columns being included or excluded
* Special characters are causing formatting issues
* Locale-specific formatting differences

**Solutions**

* Review which columns are visible in the table
* Check for special characters in data that might break formatting
* Test with simple data first to isolate formatting issues
* Consider data cleansing if special characters are problematic

***

### Copy action works but paste doesn't

**Possible causes**

* Target application doesn't support the data format
* Clipboard was overwritten before pasting
* Paste permissions blocked in target application

**Solutions**

* Verify the target application supports tab-separated or CSV data
* Copy and paste immediately without copying anything else in between
* Try pasting into a simple text editor first to verify the data is in clipboard
* Check target application's paste permissions and settings


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/copy-records.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
