Continuing the discussion from Need a linq query to solve this issue:
i want another column adjacent to the validation column(please add it as Status) to show all names of columns comma seperated which are showing values other than “NoChange”.
Continuing the discussion from Need a linq query to solve this issue:
i want another column adjacent to the validation column(please add it as Status) to show all names of columns comma seperated which are showing values other than “NoChange”.
First add a new column names status …and then inside loop try this
CurrentRow("Status") = String.Join(",",dt.Columns.Cast(Of DataColumn).Select(Function(m) m.ColumnName.ToString).Where(function(x) Not currentRow(x).ToString.Equals("NoChange")))
Cheers
I have an ID column and Validation Column , i dont want those two columns to be considered in the condition.
Try this
CurrentRow("Status") = String.Join(",",dt.Columns.Cast(Of DataColumn).Select(Function(m) m.ColumnName.ToString).Where(function(x) Not currentRow(x).ToString.Equals("NoChange") AndAlso Not {"ID","Validation"}.Contains(x)))
Cheers
Can you exclude column ID from this query
If(CurrentRow.ItemArray.All(Function(x) x.ToString.Trim.Equals(“NoChange”)),“OK”,“Error”)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.