> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/snippets/using-composite-keys.md).

# Using Composite Keys

This snippet sample project demonstrates how to configure composite keys for updating and deleting records.

{% hint style="info" %}
The sample uses a simple example for deleting a record from a SQL Customers table using multiple fields that make up the composite key.   The process is the same for modifying a record using composite keys.
{% endhint %}

<figure><img src="/files/MpCOKEJYuGPOib9XoZ4x" alt=""><figcaption></figcaption></figure>

**Activities:**

1. **InitializeTarget**   This activity initializes the Target activity that will be used for the deletion.
2. **DeleteRecord**  This activity is used for performing the actual record deletion.

&#x20;  Edit the DeleteRecord activity:

&#x20;

<figure><img src="/files/lxE0lT4hAFgz7TrutQvN" alt=""><figcaption></figcaption></figure>

Then click on the Option property:

<figure><img src="/files/vKcbjNIIYjW4i3hf7I0T" alt=""><figcaption></figcaption></figure>

Select Composite Key as the key type and configure the collection of composite keys:

<figure><img src="/files/bx8atZdng5kAAzDifj5W" alt=""><figcaption></figcaption></figure>


---

# 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.appstrategy.com/apprules-r-documentation/samples/sample-projects/snippets/using-composite-keys.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.
