How to check a specific column in the datatable is blank or not

how to check a specific column in the datatable is blank or not using If ACTIVITY in a For each row.Can any on help on this ASAP?

Hi @krishnan,

Using if condition

Convert.tostring(row("columnname"))=""

Or
string.IsNullOrEmpty(Convert.tostring(row("columnname"))

Using linq we can get specific columns without null and empty

DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not Convert.ToString(row.Item("columnname')).Equals(""))).CopyToDataTable()

Regards,
Arivu

after checking column is blank in datatable,how do I assign a new value to the column?

Hey @krishnan

Check it out:

Regards…!!
AKsh

Hi @krishnan,

If you want update any value for the datatable better go to for each row and checj the condition and update it.
in side for each row
use Assign activity
row("Columnname")="value"

Regards,
Arivu

I am using For each row and ,checking the condition.I want to know how to update the datatable column?

Hi @krishnan,

use this code to update ,see the previous post.

use for each row activity

inside use if condition to check the value is empty or not

after that use Assign activity to update the column value.
row("ColumnName") ="your value"

Regards,
Arivu

Thanks for your help.

I have variable1 = 110.00(PDF) and variable 2 = 110(CSV) which are amount fields with

I want to compare variable1 = variable2.how do I do it?

Hi @krishnan,

Convert.ToDouble(Variable1)= Convert.ToDouble(Variable2)

Regards,
Arivu

I have variable1 12,345.00
varaiable2 = 12345
how to convert?

How do I clear a string variable ?Can anyone help me?

Hi @krishnan,

Use if condition to check the values are equal or not

Variable1=String.Empty

Regards,
Arivu

Hi @arivu96,

what is the row in this expression ? Because I am trying to use this but it showing me the error.

Thanks,

Saili