---
title: "IVariable Interface"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.ivariable.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# IVariable Interface

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
A structure representing a variable item in a product.
  
 - example
     - ```
editor.getProduct()
    // If we have successfully obtained the product.
    .then(function (product) {
        return product.getVariableItems();
    })
    // If we have successfully obtained an item list.
    .then(function (items) {
        if (items.length)
            items.forEach(function (item) {
                console.log(item.name);
            });
        else
            console.log("This product contains no variable items.");
    });
```
 
## Properties
 
### name
 
name: string

The name of a variable item.
 
### type
 
type: "Image"  |  "ImagePlaceholder"  |  "Text"  |  "InString"  |  "BarcodePlaceholder"

The type of a variable item.
 
### Optional value
 
value: string

The value of a variable item. For texts, it is the content. For in-string placeholders, it is either entered text or default value. For barcodes, it is a string with the content.
