# Copy Records to Clipboards

## 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 can only be added as a **Header Action** on Data Table components. It is not available for other component types or as a row-level action.

***

## What It Does

When users click a button or action configured with the Copy Records interaction, the system automatically copies data from the selected rows in 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

***

## How to Add Copy Records Interaction

### **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 only available when configuring header actions. You won't find this option in:

* Row actions
* Button components
* Other interaction types
  {% endhint %}

***

## User Experience

### **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

***

## 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

***

## Accessibility Considerations

* **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


---

# Agent Instructions: 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:

```
GET https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/record-operations/copy-records-to-clipboards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
