hi friends, i am having problem where my process takes the info from the excel sheet to type into text boxes on a website, but when there is a empty row it messes the whole process off, can someone show me how to skip this or igonore it so it wont type in blanks on the website.
Can you let us know if you want to skip the row based on any certain column being empty?
Best Regards.
if patient first name is empty then i want to skip the whole loop and move on to the next cell i
Hi @Shazid_Rahman,
Following query will give all the rows which has data in Patient First Name column.
(from s in inputDt.AsEnumerable where Not String.IsNullOrEmpty(s(“Patient First Name”).ToString) Select s).CopyToDatatable
If you are using foreach row and you want to skip that row the you can use If activity with condition String.IsNullOrEmpty(row(“Patient First Name”).ToString) and in then part pull Continue activity.
Hope it helps.
Regards,
Harshith
can i call the row without using the header
Yes. You can use index.
If Patient Full name is first column, then s(0).ToString.
what does the “s” stand for
If you are using the query i sent as shown below,
(from s in inputDt.AsEnumerable where Not String.IsNullOrEmpty(s(“Patient First Name”).ToString) Select s).CopyToDatatable
then s is declared as a row.
If you are using for each row, then you should use the variable you are using to loop. For example row or currentrow.
You can use the following query in the assign activity:
dt.AsEnumerable.SkipWhile(Function(row) row(“PatientName”).ToString.Equals(String.Empty)).CopyToDataTable
Here, dt is the datatable that you are using. Instead of row(“PatientName”), you can use row(columnIndex). If PatientName is in 3rd column, you can use row(2).
Hope this helps,
Best Regards.
Use a filter datatable activity and filter the column firstname with is Empty and it would remove all the empty rows from the datatable…so in your loop you would not have any empty values at all
Hope this helps
Cheers