# Transforms

A dataset `Transform` function is a transformation hook.  This is an optional event handler that can be set on a dataset to make modifications to the data returned from the call to a data service before the change is broadcast to consumers.&#x20;

{% hint style="info" %}
Note, the `Transform` function was called `View` in earlier versions of WireBootstrap.
{% endhint %}

In the example below,  the data retrieved from the data service call is passed into the transform inside a configuration object as a data table.  A new column is added and the table is returned to the dataset in the callback.

```javascript
...
    
const dataset = new wire.data.DataSet({
    Source: accountService,
    Query: query,
    Transform: (config, callback) => {
        
        //
        // config.table is a DataTable
        //
        const table = config.table;
        
        //
        // add a new column to the table 
        //
        table.addColumn("FullName").calc((row) => {
            return row.FirstName + " " +  row.LastName;
        });
        
        //
        // tell the dataset we are done 
        // sending back the updated data table
        //
        callback(table);     
    }
});
```

For more on data set transforms, visit the [DataSet](/wirebootstrap/reference/wire.data/wire.data.dataset.md) reference page.


---

# 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.wirebootstrap.com/wirebootstrap/transforms.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.
