Latif
May 20, 2025, 9:22pm
1
how to get column name out where value is Nullable.value??
table has column name as product name
> Column name = (SamsungTV, Xbox, PlayStation, Nitendo, AppleTV)
> Value = (,1,1,,1)
when I have completet the proces it will add Int value 1 on column … and when not completed value is NULLABLE.
And i want to fatch which column is left means is not completed. and according to that table its SamsungTV and Nitendo.
how can i get the column name out?
Hi @Latif
Use For Each activity on dataRow.Table.Columns then inside use If IsNothing(dataRow(column)) or IsDBNull(dataRow(column)) then add column.ColumnName to list variable.
If you found helpful please mark as a solution. Thanks
Happy Automation with UiPath
You can use below linq query in assign activity
nullColumns = table.Columns.Cast(Of DataColumn)()
.Where(Function(col) IsDBNull(row(col)))
.Select(Function(col) col.ColumnName)
.ToList()
where nullColumns is List of String
Latif
May 21, 2025, 7:13am
4
adi.mehare:
nullColumns
No example is working. Both gives different errors
Can you tell what is the error you are getting?
nullColumns = table.Columns.Cast(Of DataColumn)().Where(
Function(col) IsDBNull(row(col)) OrElse String.IsNullOrWhiteSpace(row(col).ToString())
).Select(Function(col) col.ColumnName).ToList()
There could be some row with blank space so try this modified query.