18-01-21 11:58 AM
Hi all,
i've a collection field with dynamic column name but always with ONE row.
I need to check if this row contains at least one "YES" value.
I didn't want to loop through each collection, so my idea is to use:
1) Get collection as CSV (in that case i have one text data item with all values separated by a comma) but now, how can i check if at least one value after comma (,) is YES?
Can i use a regex pattern?
Thanks in advance
18-01-21 02:47 PM
18-01-21 02:57 PM
18-01-21 03:07 PM
18-01-21 03:36 PM
18-01-21 03:45 PM
18-01-21 03:47 PM
Thank you, i've tested the regex but in this case it match also with a column name that contains YES, is correct?
I can do it in C#? Do you know if there is something already done?
Is possible to use a LinQ Expression to check it?
Thanks in advance
18-01-21 04:13 PM
found = table.AsEnumerable().Any(row => {
foreach (DataColumn col in table.Columns) {
if (row[col].ToString() == valueToFind) {
return true;
}
}
return false;
});
18-01-21 04:53 PM
18-01-21 05:16 PM