I have to validate each row in particular column(Display Id) with length

I have to validate each row in particular column(Display Id) with length
Ex: ABC000001234567----Validated
ABC000031—Not validated

image

can u elaborate your requirement a bit more!

In display Id column having change request number it contain exact 15 letters, if less than 15 then u have remove that row

thanks
shaik muktharvalli

  1. Use the 'Read Range workbook ’ activity to read your data into a DataTable.

  2. Use a ‘For Each Row’ activity to iterate through the DataTable.

  3. Inside the loop take if activity

If condition

currenrow(“ColumnName”). Tostring. Length=15

Then section

It will give Validated

Else section

Use remove data row activity or filter data table to remove

@shaik.muktharvalli1

Try this it will work sure…
Let me know if not

Cheers
@shaik.muktharvalli1

Let me try and confirm you @Praveen_Mudhiraj

Yeah ok let me know then

@shaik.muktharvalli1

input and output->
image

follow this:dt_1.AsEnumerable() .Where(Function(row) row.Field(Of String)(“display id”).Length = 15) .CopyToDataTable()


@shaik.muktharvalli1 let me know if it works!

cheers!

@shaik.muktharvalli1

please try this

dt.AsEnumerable.Where(function(x) x(0).ToString.Count.Trim=15).CopyToDatatable

cheers

Hi @shaik.muktharvalli1

try this

For Each Row in dtData
If row(“Id”).ToString.Length < 15
Remove Data Row (Input: row)
End If
End For Each Row

Expression

dt = dt.AsEnumerable() .Where(Function(row) row.Field(Of String)("Display ID").Length.Equals(15)) .CopyToDataTable()

you can try this xaml it will work

Xaml : - column(Display Id) with length.zip (1.7 KB)

input : -
image

output: -
[Display ID,operational CategerizationTier 3
ABC500003147579,New Cell Creation
ABC500003147579,New Cell Creation
ABC500003147579,New Cell Creation
ABC500003147579,New Cell Creation
ABC500003147579,New Cell Creation
ABC500003147579,New Cell Creation
]

Note : dt variable type is **system.data.datatable**

@shaik.muktharvalli1

thank you working fine :slightly_smiling_face:

1 Like

thanks for instant replay @vinitha_yachamaneni

Thanks all for instant replay

Thanks @tazunnisa.badavide it’s working fine :star_struck:

1 Like

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