Error: BC30311 Value of type Datarow() cannot converted to Boolean

dtinput.Select(“Status =‘Hired’”).ToString()

using if condition
If the “Status” column in an excel contains “Hired” value.

it shows an an error datarow cannot convert to boolean

Hi @AbarnaKalaiselvam

what are you trying to perform?
your code will return all the rows that equals to Hired from the Status column, it is not a validation, if activity requires a code that returns true or false so please tell us what are you trying to perform and we can help you better


If a Status column contains a Hired value then send a mail to particular candidate

Hi @AbarnaKalaiselvam ,

If my understanding correct you can use below activity :
Case 1 : looping one by one data and send email if the is correct value

Case 2 : filter datatable and check if there is correct value, if yes send email


you can just edit it a littlebit like this

dtinput.Select("Status ='Hired'").Count > 0

or another approach could be the following

dtInput.AsEnumerable.Where(Function(x) x("Status").ToString().Trim().ToUpper().Equals("HIRED")).Count > 0

Regards @AbarnaKalaiselvam

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