# How to use unsaved settings values for exportSelect (supportsHandlebar)

**URL:** <https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761>\
**Category:** Integrator.io\
**Tags:** handlebars\
**Created:** [October 21, 2025, 1:45am UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761 "2025-10-21T01:45:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marceloborges](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/marceloborges/32/9594_2.png) [@marceloborges](https://connective.celigo.com/u/marceloborges)\
**Post date:** [October 21, 2025, 1:45am UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761/1 "2025-10-21T01:45:13Z")

</div>

Hi,

I’m trying to use the supportsHandlebar example from the Common Form Fields documentation, but it doesn’t seem to work.

[https://docs.celigo.com/hc/en-us/articles/360059205112-Common-form-fields#UUID-6ce95fef-1430-cbc6-4dfe-e5f0285a0f8e\_section-idm73515219760120](https://docs.celigo.com/hc/en-us/articles/360059205112-Common-form-fields#UUID-6ce95fef-1430-cbc6-4dfe-e5f0285a0f8e_section-idm73515219760120)

My use case is: I have 2 dynamic lookup fields: Companies and Customers. The Companies lookup will look a generic Companies list, and when I select a value for it, I would like the Customer list to update accordingly.

The Companies API endpoint is as simple as: /api/v2.0/companies

The Customers API endpoint, depends on the company value: /api/v2.0/companies( **\<\>** )/customers

But this doesn’t work. When I select a Company, I don’t know how to reference the Company Id that was selected on the 1st dynamic lookup.

Here’s my Customers exportSelect field, and I’m trying to reference my Company Id field by {{export.company}}, but it doesn’t seem to work, I keep on getting the error message “expecting array. try transform?”

 ![image](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/5/5d5932e8e39b55cd7d8514ab571d061284750e36.png)

Any insight here would be great! Thanks,

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [October 21, 2025, 3:08am UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761/2 "2025-10-21T03:08:46Z")

</div>

You're pretty close, but probably need a transformation to return the results correctly from the virtual export and to the form.

```json
{
  "fieldMap": {
    "company": {
      "type": "exportSelect",
      "id": "company",
      "name": "company",
      "label": "company",
      "resource": {
        "virtual": {
          "name": "Get companies",
          "_connectionId": "6525a3099085040ecbf55b4d",
          "http": {
            "relativeURI": "/v2.0/companies",
            "method": "GET",
            "paging": {
              "method": "url",
              "path": "[@odata.nextLink]",
              "lastPageStatusCode": 404
            },
            "response": {
              "resourcePath": "value"
            }
          },
          "transform": {
            "type": "expression",
            "expression": {
              "rules": [
                []
              ],
              "rulesTwoDotZero": {
                "mappings": [
                  {
                    "generate": "value",
                    "dataType": "string",
                    "extract": "$.id",
                    "status": "Active",
                    "sourceDataType": "string"
                  },
                  {
                    "generate": "label",
                    "dataType": "string",
                    "extract": "$.name",
                    "status": "Active",
                    "sourceDataType": "string"
                  }
                ],
                "mode": "create"
              },
              "version": "2"
            },
            "rules": [
              []
            ],
            "version": "2"
          },
          "adaptorType": "HTTPExport"
        }
      }
    },
    "customer": {
      "id": "customer",
      "name": "customer",
      "type": "exportSelect",
      "label": "customer list based on company",
      "supportHandlebars": true,
      "refreshOptionsOnChangesTo": [
        "company"
      ],
      "visibleWhen": [
        {
          "field": "company",
          "isNot": [
            null,
            ""
          ]
        }
      ],
      "resource": {
        "virtual": {
          "name": "Get customers",
          "_connectionId": "6525a3099085040ecbf55b4d",
          "http": {
            "relativeURI": "/v2.0/companies({{export.company}})/customers",
            "method": "GET",
            "paging": {
              "method": "url",
              "path": "[@odata.nextLink]",
              "lastPageStatusCode": 404
            },
            "response": {
              "resourcePath": "value"
            }
          },
          "transform": {
            "type": "expression",
            "expression": {
              "rules": [
                []
              ],
              "rulesTwoDotZero": {
                "mappings": [
                  {
                    "generate": "value",
                    "dataType": "string",
                    "extract": "$.id",
                    "status": "Active",
                    "sourceDataType": "string"
                  },
                  {
                    "generate": "label",
                    "dataType": "string",
                    "extract": "$.displayName",
                    "status": "Active",
                    "sourceDataType": "string"
                  }
                ],
                "mode": "create"
              },
              "version": "2"
            },
            "rules": [
              []
            ],
            "version": "2"
          },
          "adaptorType": "HTTPExport"
        }
      }
    }
  }
}

```

 ![image](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/d/d47ea822d639bf3e1c92360d057db37b3c94a198.png)

All list options require some standard format which is why a transformation is needed to return a response such as:

```json
"options": [
  {
    "items": [
      "Create",
      "Update",
      "Delete"
    ]
  }
]

```

or

```json
{
  "options": [
    {
      "items": [
        {
          "label": "Delhi",
          "value": "Delhi"
        },
        {
          "label": "Hyderabad",
          "value": "Hyderabad"
        },
        {
          "label": "Chennai",
          "value": "Chennai"
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![marceloborges](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/marceloborges/32/9594_2.png) [@marceloborges](https://connective.celigo.com/u/marceloborges)\
**Post date:** [October 21, 2025, 1:23pm UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761/3 "2025-10-21T13:23:56Z")

</div>

Hi Tyler, thanks for the answer. It does make sense what you said, but I literally copied your solution (which is very similar to the one on the help article as well), and I just replaced 2 things:

- Connection ID
- RelativeURI: In you example, your RelativeURI started with /v2.0, and I changed mine to include /api/v2.0 because my HTTP connector is connecting to a more generic Business Central URL

And still, I’m getting the same error message as I was getting before:

 ![image](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/27bbc59f3c805015c44a85f80bb08453e6ab28cd.png)

The moment I replace {{export.company}} with a hardcoded Fixed Id, then the list gets populated correctly.

 ![image](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/41d183f5a13e14ee0e6604063029aabe18a8d200.png)

Does it have anything to do with the Relative URI? Or the way my HTTP Connector is setup?

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [October 21, 2025, 1:28pm UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761/4 "2025-10-21T13:28:46Z")

</div>

Where are you building this form? Is it on the integration level, flow group, flow, export, or import level? I suspect you might need to use `{{integration.company}}` or one of the others.

---

<div class="post-metadata">

**Author:** ![marceloborges](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/marceloborges/32/9594_2.png) [@marceloborges](https://connective.celigo.com/u/marceloborges)\
**Post date:** [October 21, 2025, 1:38pm UTC](https://connective.celigo.com/t/how-to-use-unsaved-settings-values-for-exportselect-supportshandlebar/5761/5 "2025-10-21T13:38:11Z")

</div>

That was it! Indeed, I had this form being built on the integration settings, not on the export. Thanks!
