Getting Exception on Filtering data from particular column of CSV File

Error Message :- Can’t Find column
Source :- Assign

Any one clear this out for me pls…!!!

DataFilter|690x387

1 Like

Hi @Hendry_john,

One of the column might be missing in either side of assign activity, like left side assign activity may have 4 columns and right side of assign may have 5 columns.

If you feel i am wrong in understanding your issue, kindly elaborate a bit more. We can find the solution for this… its easy…

Cheers…!

2 Likes

Actually i was trying to filter rows having values ‘yes’ from particular column.

Yes,Columns in the table are equal…

Also i don’t have any column named 'Yes", Still the error message showing “Cannot find column ‘Yes’”

2 Likes

@Hendry_john,

No problem, can i see the assign activity once with filter made on value side. It would be helpful. kindly tell the no of columns in the table as well.

Cheers…!

1 Like

Yeah… i have 3 columns in my table.

thank you :slight_smile:

1 Like

@Hendry_john,

I think there is some issue with column name only, “Club Member”

If you are reading the datatable from an excel and using read range activity, Kindly check whether you have checked “Add Headers” Properties, because it might not take that as column name…if not checked…

else fine, lets find this, Kindly use output data table, to get the csv format and try to display that in output panel with write line activity…this is usually done to check with column name and other data. Copy that column name and paste it inside that square brackets in this select statement.

Kindly try this, we can easily sort this out…

Cheers.

2 Likes

i checked the data table output from “Output data table” activity…Clearly i could see the the entire data table output in console.
As u suggested i tried copying the column name(Club Member) from console and pasted it inside square brackets. Still same error is coming… :frowning:

Can’t drop off this sequence without finding solution for this issue… :frowning:

Pls help to fix this issue …!!!

2 Likes

Hi @Hendry_john!

Did you try to use the Filter Wizard already?

Check this Main.xaml (10.2 KB)

Another thing, check if there’s no special characters in your column string

~Diego Turati

3 Likes

@Hendry_john,

Try to replace the column name with its index, its working…As @DiegoTurati suggested there must be some special characters

I have something for you, see this,

Dont worry… lets solve this together…

Cheers…

1 Like

I don’t have any special character in my column String.

And i am trying with Select method to filter the data ,not using filter wizard activity for my current sequence.

1 Like

@Hendry_john,

Buddy…! Its done…we dont need to mention the column name, may be we enter the wrong one,

let the bot enter the column name in select method. and i tried…Its working, Kindly refer the below xaml for you reference…

Main.xaml (8.2 KB)
Book1.xlsx (15.1 KB)

Lets do this…!

Cheers…!

2 Likes

Really thank you brother :slight_smile:

Now i got how to select coloumn string from table :slight_smile:

And from your source file i have two queries ,

  1. should we use square bracket for a string column having space as indentation(as in our case “Club Members”)???

  2. while iterating by for loop, why we are using “item(0)” ,instead why can’t we use “item” alone??

Thank you :slight_smile:

1 Like

Hi @Hendry_john,

Great, that’s really a good question,

ok…!

query 1.
----Yes…buddy, we have to use square brackets for a variable or a value that has space in between. If there is no space we don’t need to have the square brackets…

query 2
—Dt_Array - the variable that we obtained from select method gives us array of datarow.
so inside for each loop, we willl be using datarow in the array one by one. As each datarow has number of columns in it , we need to mention the column name or column index to get the specific value in that datarow. Thats why we mention the index with name or indx value like item(0). If you write just item the output would be just a string like “system.data.datarow”, not the value that we want.

Hope this would help you…

Cheers…! Keep going…!

2 Likes

@Hendry_john,

Buddy, Kindly mark it as solution so that it would help others while looking for answer…if you feel its working fine.

Cheers…

2 Likes

Thank you anna :slight_smile:

1 Like

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