Multi-Value Input for Datalinks

Hi, all.

I was wondering if anyone has found any success in developing a method to input multiple values as an input parameter in a datalink to pull out data from Epicor via a REST API call. The Integration datalinks have a VarChar [multiple] option which is not available to developers when creating their own datalinks. I am looking for a way to potentially get this working without that easy option.

As an example, it would be nice to be able to input multiple PO numbers and have every receipt line for all of them populate a field group. At this time the only way that I have been able to accomplish things like this is by looping through the workflow step and populating temp tables, moving the values as needed to build my final table.

This is now an idea suggestion for Epicor ECM:
https://epicor-ecm-docstar.ideas.aha.io/ideas/ECM-I-1158

I found a SQL workaround for this, but it will only work for OnPrem Epicor environments and only those using SQL Server 2016 or later due to the SPLIT_STRING function. This type of statement will allow a comma separated multi-valued input to be used for a SQL datalink. You will have to create that list using other ECM tasks.

Example:
SELECT [Name],[VendorNum] FROM [EpicorDatabase].[Erp].[Vendor] INNER JOIN STRING_SPLIT(@VendorNum,‘,’) AS s
ON LTRIM(s.value) = VendorNum WHERE Company = @Company

Parameters:
@Company (VarChar)
@VendorNum (VarChar)

NOTE: The “EpicorDatabase” would need to be substituted with your own Epicor database instance.

1 Like