Using dt.select() with data tables

Hello - I am having trouble with the attached workflow where I am trying to use dt.select() functions to add a value from one dt to another dt. I am getting the error Assign: Index was outside the bounds of the array. Can anyone help as to what I am doing wrong?

I have attached the workflow to this question. Thanks in advance. TestProcessDTSelect.zip (28.2 KB)

@Cormac It is not working because in the assign select condition you are passing wrong arguments.
You should use the expression below and see if that’s your expected output.
ReportDT.Select(“Convert([Model],‘System.String’)=’”+row.Item(“MaterialCode”).ToString+"’")(0)((“Vendor Number”).ToString)

image

1 Like

Hi @Pravin_Patil1 - I tested your solution but it seems it is looking for a column which doesn’t exist.

ReportDT.Select(“Convert([Model],‘System.String’)=’”+row.Item(“MaterialCode”).ToString+"’")(0)((“Vendor Number”).ToString)

Paste this as it is in assign…I think you did some change…The column name I can see in exception I didn’t provide in assign

It is working fine for me. Below output I’m getting

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.