# \[Mapper 1.0 - Integration App\] How to Lookup for array data type

**URL:** <https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621>\
**Category:** Integration Apps\
**Tags:** magento-2, integration-app, import, lookup, netsuite\
**Created:** [May 21, 2025, 6:52pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621 "2025-05-21T18:52:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathanmatthews](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nathanmatthews](https://connective.celigo.com/u/nathanmatthews)\
**Post date:** [May 21, 2025, 6:52pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/1 "2025-05-21T18:52:15Z")

</div>

I am working in the [Magento 2 - NetSuite] Integration App \> [Magento Customer to NetSuite Customer Add/Update] flow. This integration app uses Mapper 1.0.

I want to add an import step mapping of a string-array field. I want to add a Lookup for that mapping, doing a Lookup for each string in the array, but I don't see how in this Mapper 1.0 flow. The Lookup only works for a single source-to-destination value, not a string-array - even if I set the "Data type" to "String array".

If I could, I would use a "Dynamic: NetSuite search" Lookup, but I will settle for a "Static: Value to value" Lookup.

---

<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:** [May 22, 2025, 2:01am UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/2 "2025-05-22T02:01:06Z")

</div>

Took me a few tries, but this is working for me. I didn't try with dynamic mapping, but this should work for that as well.

 ![This image shows an interface for mapping fields between Shopify and NetSuite, with input and output JSON data on the right. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/e/eb320e87e41c6a82477446f51a505e7d0adb4d0b.png)  
 ![The image shows a software interface screen for editing mapping settings between Shopify and NetSuite, with options for configuring data types, field mappings, and value imports. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/2/27d5f9858cbce88b72ebc5fc7fb9e707f37a3b64.png)

---

<div class="post-metadata">

**Author:** ![nathanmatthews](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nathanmatthews](https://connective.celigo.com/u/nathanmatthews)\
**Post date:** [May 22, 2025, 2:13pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/3 "2025-05-22T14:13:44Z")

</div>

@tylerlamparter , thank you for your response!  
Unfortunately, it doesn't look like this will work. This _does_ work if the destination record field is a sublist field, which is what you are showing. I confirmed this does work myself. But it doesn't work when the destination field is a body field that is multi-select type in Netsuite. I neglected to include that point, which seems to be the unsupported point that I am stuck at.

---

<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:** [May 22, 2025, 5:20pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/4 "2025-05-22T17:20:33Z")

</div>

Unfortunately, I hit a roadblock as well. I was attempting to use each Handlebars with compare blocks, but it seems the compare block will force exit of the else block when something is evaluated to true. I don’t think it does this when it’s a mapping to a sublist, but since you’re going to a body field, we would need this added functionality. We are working on many Handlebars enhancements, so I’ll get this on the list.

 ![The image shows a screen from the integrator.io platform featuring a Handlebars template editor with code input and output areas, as well as a section for exploring integration examples. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/f/f8ad81b9118ef28cf588b44ae54d5e03b1718aa1.jpeg)

Also, since you’re using the IA, the only other solution I can think of would be to create a user event script in NetSuite that runs before submit. In that script, you could have this mapping logic. You could alternatively custom build the whole flow and not use the IA and then use scripts in Celigo.

---

<div class="post-metadata">

**Author:** ![nathanmatthews](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nathanmatthews](https://connective.celigo.com/u/nathanmatthews)\
**Post date:** [May 22, 2025, 7:11pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/5 "2025-05-22T19:11:00Z")

</div>

@tylerlamparter , thanks again for the follow-up!  
You have arrived at the same conclusion that I have. I did attempt to use a Netsuite user event script to map the values in beforeSubmit context - unfortunately the values on the Record don't make it that far. Looking at debug logs from the Celigo restlet logic, it seems that `setFieldTexts` is automatically used for the field when the values in question are a string, even when I map them as `internalid` in Celigo. `setFieldTexts` only sets values that are valid, and since these aren't, in my beforeSubmit user even the field on newRecord shows empty array.

My best workaround right now is to add a new hidden entity field on Netsuite that I will use to pass the value through. I will pull that value in the user event, map it, and then set to the real field. Not a pleasant workaround.

I'm looking forward to this functionality working in [integrator.io](http://integrator.io)! Thanks again!

---

<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:** [May 23, 2025, 2:20am UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/6 "2025-05-23T02:20:51Z")

</div>

I read your first paragraph and was thinking "you'll need to map to a hidden custom field", but you got exactly where I was going!

---

<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:** [May 28, 2025, 4:59am UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/7 "2025-05-28T04:59:17Z")

</div>

@nathanmatthews I'm not sure how many options you have, but can you try this? Thanks to @priyankakoundal's help, this should work. We've also raised a bug for the `else compare` exiting the loop after the initial compare check.

```handlebars
{{#each tags}}{{#compare this "===" "abc"}}item1{{/compare}}{{#compare this "===" "xyz"}}item2{{/compare}}{{^if @last}},{{/if}}{{/each}}

```

---

<div class="post-metadata">

**Author:** ![nathanmatthews](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nathanmatthews](https://connective.celigo.com/u/nathanmatthews)\
**Post date:** [May 28, 2025, 8:46pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/8 "2025-05-28T20:46:03Z")

</div>

@tylerlamparter, I have ~70 options to map, so not ideal to put all into handlebars (if it could even handle that long of a string). This is nice to know, though. Thanks @priyankakoundal !

---

<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:** [May 28, 2025, 11:31pm UTC](https://connective.celigo.com/t/mapper-1-0-integration-app-how-to-lookup-for-array-data-type/4621/9 "2025-05-28T23:31:35Z")

</div>

That makes sense why you wouldn't want that in compare handlebars then. We will support lookupCache in handlebars at some point and then in that case you'd probably be able to use it. I think it would work for Mapper 1.0 handlebars and IAs, but will confirm with @priyankakoundal.
