Joining to Data Tables

I want to join to two tables from different excel files, they do match in the column “Personalnummer”, but somehow I do always get the same error code

"Error: System.ArgumentException: der Wert für Argument ‘Spaltenname’ ist nicht festgelegt oder ungültig.
at UiPath.DataTableUtilities.DatatableExtensions.GetColumnIndex(DataTable dt, Object argumentValue, Boolean throwIfNotFound)
at UiPath.DataTableUtilities.DatatableExtensions.GetColumnIndex(DataTable dt, InArgument arg, ActivityContext context, Boolean throwIfNotFound)
at UiPath.Core.Activities.JoinDataTables.<>c__DisplayClass24_0.b__0(JoinOperationArgument a)
at System.Linq.Enumerable.SelectListIterator2.Fill(ReadOnlySpan1 source, Span1 destination, Func2 func)
at System.Linq.Enumerable.SelectListIterator`2.ToList()
at UiPath.Core.Activities.JoinDataTables.JoinRowsWithEquals(DataTable dataTable1, DataTable dataTable2, ActivityContext context)
at UiPath.Core.Activities.JoinDataTables.JoinRows(DataTable dataTable1, DataTable dataTable2, ActivityContext context, Boolean onlyEquals)
at UiPath.Core.Activities.JoinDataTables.JoinTables(DataTable dataTable1, DataTable dataTable2, ActivityContext context)
at UiPath.Core.Activities.JoinDataTables.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) "

For clearance: I work with the Web bases Studio application: Does someone know what to do ?

Hello Seymen,

  1. Check Column Name: Make sure the column name you’re using for filtering exactly matches the column name in your DataTable. It’s case-sensitive.
  2. Verify DataTable: Confirm you’re using the correct DataTable variable as input for the activity.
  3. Inspect in Debug Mode: While debugging, check the DataTable in the “Locals” panel to ensure column names match.
  4. Use String for Column Name: Provide the column name as a string in the “Column Name” property of the activity.

Regards,
NikZ

Hi @seymenkapkiner

Error: System.ArgumentException: The value for the argument ‘column name’ is not set or is invalid.

As this error says the column you are trying reference doesnot exit. Check if the column name has spaces in the end and try to trim those spaces if exists

Check this !

Thank you for the advice, I did try that, but that doesn’t seem to be the issue. Might there be something else I could try ?

Hello,
Can you give us a screenshot of your workflow?

Certainly, I will share some screenshots for the workflow I built up so far.

I will share the more screens in following messages

Hi @seymenkapkiner,

You are doing a full join. Hence, no need to enter the join rules.
kindly remove the joining rule in filter builder & try.

PFB UiPath documentation:

UiPath Documentation: Join Table

Kindly mark as solution, if it resolves your issue :slight_smile:

Br,
NikZ

You can use linq to achieve your goal by using linq perform complex operation with less code.

(From row1 In dt1.AsEnumerable()
Join row2 In dt2.AsEnumerable()
On row1.Field(Of String)(“PersonalNumber”) Equals row2.Field(Of String)(“PersonalNumber”)
Select dtResult.LoadDataRow(New Object() {
row1.Field(Of String)(“PersonalNumber”),
row1.Field(Of String)(“Name”),
row2.Field(Of String)(“Department”)
}, False)
).CopyToDataTable()

In LoadDataRow(New Object(){ col1,col2..}

Join multiple columns

Try pasting all the column names in a log message before the Join activity and see if there is any type of mismatch happening.