Data Table Select Option

cdr.Select(“Client =”+“‘“+serverName+”’”+“”).CopyToDataTable

I have tried looking for solutions but this error is still there. It does not work.

I referred to this


cdr.Select(“Client =‘”+serverName+"’).CopyToDataTable

will this work for u?

1 Like

I tried it.
cdr.Select(“Client ='”+serverName+“'”).CopyToDataTable
It doesn’t work

@sangasangasanga Any error u getting?

Can i know your requirement?

It works but there are extra spaces in the top

@sangasangasanga Those extra spaces are somewhere in ur workflow. U check the workflow or Can u share ur workflow?

a class=“attachment” href=“/uploads/default/original/3X/4/7/471f81792e716d5700e5a52e56b7905291c30241.xaml”>CloneMain.xaml (111.5 KB)

@sangasangasanga Try below workflow i have made changes.

CloneMain.xaml (111.6 KB)

Now there are no spaces but it keeps looping

@sangasangasanga try below workflow and let me know.

CloneMain.xaml (112.3 KB)

It gives this error.
CloneMain (1) has thrown an exception

Source: For each row

Message: Collection was modified; enumeration operation might not execute.

Exception Type: InvalidOperationException

System.InvalidOperationException: Collection was modified; enumeration operation might not execute.
at System.Data.RBTree1.RBTreeEnumerator.MoveNext() at UiPath.Core.Activities.ForEach1.InternalExecute(NativeActivityContext context, IEnumerator valueEnumerator)
at UiPath.Core.Activities.ForEach`1.GetStateAndExecute(NativeActivityContext context, ActivityInstance completedInstance)
at System.Activities.Runtime.ActivityCompletionCallbackWrapper.Invoke(NativeActivityContext context, ActivityInstance completedInstance)
at System.Activities.Runtime.CompletionCallbackWrapper.CompletionWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@sangasangasanga try below one, i think this will work correctly.

CloneMain.xaml (113.0 KB)

@Manjuts90 Hi now there are no spaces but it loops twice. Any idea why?

@sangasangasanga above file getting loops data twice?

@Manjuts90 yes

@sangasangasanga try below workflow and let me know.

CloneMain.xaml (113.6 KB)

@Manjuts90 Hi, may I know what are the changes you are doing? As i see the workflow, looks the same but the output differs.

@sangasangasanga i have changed the position of clear datatable and also cleared first row in build datatable acitivity due to this ur getting empty spaces in excel file.

1 Like