---
title: "generateDataSourceNameFromLayerName()"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220801084/generateDataSourceNameFromLayerName()"
format: markdown
---
> ℹ️ **Information**
> ℹ️ 
> ℹ️ Implementation version: beta 1.02

# Description

It generates the name of the dataSource from the layer name's format.

# Invocation

```javascript
generateDataSourceNameFromLayerName(
	layerName
)
```

# Input parameters

## layerName

<span style="color: #091e42">The name of the layer from which the dataSource's </span><span style="color: #091e42">name </span><span style="color: #091e42">will be generated. This name corresponds to the entity collection's name </span><span style="color: #091e42">(</span>[<span style="color: #091e42">featureCollection.name</span>](http://featurecollection.name/)<span style="color: #091e42">).</span><span style="color: #091e42"> It is entered as a text string.</span>


# Use examples

Generate the name corresponding to the dataSource of a layer named 'mi capa de ejemplo' (Spanish for "my sample layer"):

```javascript
generateDataSourceNameFromLayerName(
	'mi capa de ejemplo'
)
```

![image](media://536b005a-b5ef-4004-923f-1832132b138b)