variable.setName(name)
variable.setName(name)
Sets the name of the variable.
Syntax
variable.setName(name: string): Promise<null>;
Parameters
- name : string - Name of the variable
Returns
Promise<null
>
A Promise that resolves to null
.
Example
// Get Collection
const collection = await webflow.getDefaultVariableCollection()
// Get All Variables
const variables = await collection.getAllVariables()
// Get Value of first Variable
const variable = variables[0]
const value = await variable.setName("Primary")