Hi All
I want to replace a blank column value with a specific value using LINQ.
Can anyone help with this?
Hi All
I want to replace a blank column value with a specific value using LINQ.
Can anyone help with this?
in all columns or only in a particular column?
A particular column.
we would suggest to do it with a for each row activity loop.
For learning purpose a LINQ could look like this
For Each row As Datarow In dt.AsEnumerable().Where(Function (r) IsNothing(r("Column1")) OrElse String.IsNullOrEmpty(r("Column1").toString.Trim))
row("Column1") = "Undefined"
Next
used within Invoke Code
Here we only do use LINQ for the filtering and do mirroring the for each activity on code.
Updating is stressing the LINQ concept and results quickly to avoidable black box approaches
Find starter help here:
InvokeCode_1Col_IfEmpty_SetDefault.xaml (6.9 KB)
Thank you.Will try this
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.