Replace value in column with another column if #

Hallo

If Column e = # then i need to replace # with the data from F

i tried som invoke code lige this:

dtTemp.AsEnumerable.ToList.ForEach(Sub(row)
If row(“e”).ToString.StartsWith(“#”) Then
row(“e”)=row(“f”)
End If
End Sub
)

But cant figure it out, any good advices? :slight_smile:

Hi @christian.bendtsen

Try this

Code:

dtTemp.AsEnumerable().ToList().ForEach(Sub(row)
    If row("e").ToString().Equals("#") Then
        row("e") = row("f").ToString()
    End If
End Sub)

Input:

image

Output:

Regards,

I got this Error: Invoke code exception has been thrown by the target of an invocation

@christian.bendtsen

Did you passed variables correctly? Can you please share xaml file

Regards,

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