# HOW TO: Use a source field as a file name in FTP import

**URL:** <https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440>\
**Category:** Integrator.io\
**Tags:** ftp, file-transfer, import, handlebars, netsuite\
**Created:** [July 15, 2020, 2:44pm UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440 "2020-07-15T14:44:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![courtneyjordan](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@courtneyjordan](https://connective.celigo.com/u/courtneyjordan)\
**Post date:** [July 15, 2020, 2:44pm UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440/1 "2020-07-15T14:44:13Z")

</div>

In this scenario, you're doing an FTP import and want to use the source field in the file name.

You would put this in the **File name** field of your import:

Not an array (classic UI):

```
{{data.fieldname}} 
```

Array (classic UI):

```
{{data.0.fieldname}} 
```

Not an array (beta UI):

```
{{record.fieldname}} 
```

Array (beta UI):

```
{{rows.0.record.name}} 
```

Our beta UI also supports: batch\_of\_records.rows... when the NetSuite export **Batch size limit** is greater than 1.

To include a timestamp, try using the Unix timestamp option {{timestamp(X)}}. You could also use {{uuid}} for a generic unique value.

You can also reference the import name via {{importName}}.

---

<div class="post-metadata">

**Author:** ![davidgollom](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/davidgollom/32/6605_2.png) [@davidgollom](https://connective.celigo.com/u/davidgollom)\
**Post date:** [September 15, 2020, 4:32pm UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440/2 "2020-09-15T16:32:14Z")

</div>

Hi Courtney.

I was really having issues getting this to work this morning. I used AFE 2.0 and this path finally worked. {{batch\_of\_records.0.record.eventObjectReference}} I had to use batch\_of\_records. The flow originates with a webhook listener.

Maybe {{rows}} is a NetSuite export thing?? It's all very confusing still. Is there a concise reference to the object model within IIO?

---

<div class="post-metadata">

**Author:** ![stephenbrandt](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/stephenbrandt/32/6891_2.png) [@stephenbrandt](https://connective.celigo.com/u/stephenbrandt)\
**Post date:** [September 15, 2020, 4:43pm UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440/3 "2020-09-15T16:43:07Z")

</div>

Hi, David. That new data structure nomenclature came online in June, and it should be apparent in the sample exported records:  
  
[https://docs.celigo.com/hc/en-us/articles/360045323471-integrator-io-release-notes-v6-6-1-0-June-2020#enhanced](https://docs.celigo.com/hc/en-us/articles/360045323471-integrator-io-release-notes-v6-6-1-0-June-2020#enhanced)

We're trying to catch up with the existing code samples, but for the near term, you should be able to use "data" references, in AFE 1.0 at least.

Sorry for the trial and error, but I'm thrilled to read about your progress.

---

<div class="post-metadata">

**Author:** ![steinchu](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@steinchu](https://connective.celigo.com/u/steinchu)\
**Post date:** [December 29, 2022, 1:23am UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440/4 "2022-12-29T01:23:13Z")

</div>

hi guys, for file name in ftp imports, is that using afe 1 or 2?

we can't seem to get the ff to work:

batch\_of\_records.0.record.fieldname

batch\_of\_records.0.record.0.fieldname

batch\_of\_records.0.data.fieldname

batch\_of\_records.0.data.0.fieldname

record.fieldname

data.fieldname

record.0.fieldname

data.0.fieldname

---

<div class="post-metadata">

**Author:** ![steinchu](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@steinchu](https://connective.celigo.com/u/steinchu)\
**Post date:** [December 29, 2022, 6:17am UTC](https://connective.celigo.com/t/how-to-use-a-source-field-as-a-file-name-in-ftp-import/1440/5 "2022-12-29T06:17:07Z")

</div>

update on this, we were able to make it work by adding file encoding and using following syntax:

 ![5301043caa20740200000001-6fbc8d0d470c4770a1382c3c23ff1140.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/7/784a15304308d955ec68dd6e7abf15b055764f34.png)
