# Set data source attributes

The Set data source attributes action node updates a selection of attributes that determine the contents and behavior of a [data source](/reference/apps/data/data-sources.md). It is often used to optimize app performance.

## Usage

This action node can control the number of objects read into an app at runtime. It is useful for database connected data sources that could potentially contain many objects and data sources that have a large number of function properties or are rarely used. It is often used in conjunction with the following attributes set [directly on the data source](/reference/apps/data/data-sources.md#general-properties):

* Initially Skip Object Count
* Initially Limit Object Count
* Initially Subscribe to Updates
* Initially Disabled
* Initially Skip Function Properties

### Disabled

This attribute can be used to control if objects are read into a data source or not. This can be used to implement lazy loading of data, enabling the data source only when a user performs a particular action. For example, if you have a data source `Company Log` and you only need this data when the user clicks a `View History` button, you can have the data source initially disabled and enable it if the user clicks the button.

### Limit

Limit can be used to control the number of objects in a data source. For example, if you want to want to implement infinity scrolling for a client user you can use initially limit object count and update the limit value to show more objects when a user scrolls in a container.

### Skip

Skip is used to control which objects are read into a data source. For example, if you want to implement pagination for a client user to browse the contents of a data source you can use skip in conjunction with limit. As the user switches between pages you can update the skip value based on the page the user is on. You can let them specify the number of objects to show per page by updating the limit value.

### Skip Function Properties

On Data Sources, you may define one or more function properties (i.e. runtime properties of type *Function*). The flag **Skip Function Properties** may be toggled to temporarily disable these function properties. When disabled, they will not be recalculated. For example, if you have an action performing a lot of CRUD operations, affecting the function properties to be recalculated - you may disable this recalculation (Skip Function Properties = `true`) for performance improvement when the action starts, and enable it again when finished (Skip Function Properties = `false`).

### Subscribe to Updates

This attribute can be used to automatically refresh the contents of a data source based on changes made by other users. This can have a performance impact, so it should only be used when necessary. Read more about Initially Subscribe to Updates on Data Sources [here](/reference/apps/data/data-sources.md#general-properties).

## General properties

<table><thead><tr><th width="218">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Data Source</strong></td><td>The data source on which to set the attributes.</td></tr></tbody></table>

## Data source attributes

*Visible when a* **Data Source** *is selected.*

<table><thead><tr><th width="225">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Disabled</strong></td><td>Set whether the data source is disabled or not. If a data source is disabled, it will be empty.</td></tr><tr><td><strong>Limit</strong></td><td>Set the maximum number of objects that can be in the data source.</td></tr><tr><td><strong>Skip</strong></td><td>Set the number of objects to skip when reading objects into the data source. For example, if <strong>Skip</strong> is set to 2, the first 2 objects in the database that would normally qualify for the data source are ignored.</td></tr><tr><td><strong>Skip Function Properties</strong></td><td>Boolean to toggle whether function runtime properties should be calculated or not. <br><br><em>The only attribute that is visible when a runtime only or calendar data source is selected.</em></td></tr><tr><td><strong>Subscribe to Updates</strong></td><td>Set to indicate whether the data source will update when another user makes a change.</td></tr></tbody></table>


---

# 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.appfarm.io/library/action-nodes/set-data-source-attributes.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.
