cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Column name into collection having #

sapna_soni0290
Level 5

Hi ,

I want to pass below value into filter parameter of collection where Column Name is data type having value = BIN # (BIN space #)and Binid is other data type having value = abc.  Please suggest how can I pass

"[Column Name]='"&[Binid]&"'"

Getting error - Internal : Could not execute code stage because exception thrown by code stage: Cannot find column [Column Name].

1 BEST ANSWER

Helpful Answers

Not sure whether you have space after BIN some thing like BIN #

then your filter statement should be  "[BIN #] = '"&[Binid]&"'"

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

View answer in original post

6 REPLIES 6

Hi Sapna Soni,

Your statement looks correct. What is the column name in master collection you are trying to filter?

"[Column Name]='"&[Binid]&"'"
Do you have Column Name in Master collection some thing like below screenshot?.

if it is dynamic collection it should be under current value

Can  you replace the "Column Name" to the actual column Name in master collection

35584.png

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

sapna_soni0290
Level 5

Hi Harish,

My Column name value is BIN #. SO i am having issue to pass this column name. May be because it has two words separated by space or may be coz its having special character #. If i try this filter condition with "BIN='"&[Binid]&"'", it works. But my column name is actually BIN #. How can i pass this value?


Hi Sapna Soni,

Try this "[BIN#] = '"&[Binid]&"'"

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Not sure whether you have space after BIN some thing like BIN #

then your filter statement should be  "[BIN #] = '"&[Binid]&"'"

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

sapna_soni0290
Level 5

Hi Harish,

Wao this works.  "[BIN #] = '"&[Binid]&"'". Can you explain me how this is working , what's the logic behind passing # within [] ?
Thanks for helping.

HI Sapna Soni,

Check below articles it will help to  handle the special characters while filtering the coll

https://learn.microsoft.com/en-us/dotnet/api/system.data.datacolumn.expression?view=netframework-4.7.2
https://www.csharp-examples.net/dataview-rowfilter/

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri