Feeding an array to a connector function as an input

How can I feed an array value to a connector function as a filter input?

I have successfully managed to do it manually by specifying an array-like string. But in this particular use case I need to use an array value which is retrieved from another connector function.

This is all using the Tulip table API.

Using the TOTEXT() function will escape the resulting output string… What else can I do to get the true array returned?

Also tried this as a dirty hack but it will throw an error in the console and not execute the trigger:

substitute(totext(@Variable.Unique target material ids for job.material_ids ), '\\', '')

Hi @sebme, let me see if I understand this correctly:

You’d like to use the value of the variable target_material_list—which is itself an array value returned by a connector function—to act as a filter for a second connector function. The place you’re struggling is that connector functions return arrays, and you cannot pass an array into an input field for a connector function. So you’re in a situation where you need to convert the array to type TEXT so that the ISIN filter will function.

Does this accurately describe your problem?

Hi John, yes, your understanding would be correct.

In the meantime I found a workaround solution either through a custom widget which does the required pre-parsing or - what our implementation partner suggested - going by concatenating the array and feeding it into a partially completed array string…

Neither workaround is particular pretty, so it would be really helpful if in the near future one would be able to directly feed arrays into the “isIn” (or “notIn”) filter.

Hi @sebme, glad you were able to find a work around in the interim.

I just checked in with the team that manages connectors, and they’re working on building functionality that will allow you to pass arrays and objects into connectors. I’ll be sure to post back as this work progresses.