Filtering data table wizard?

Hi there,

I am trying to filter a data table to remove rows which contain specific elements (contained in variables and text).

Simply put, this is not working; is there something I am doing wrong or missing to do this? The items in the ‘value’ section should be what the rows contain.

Perhaps I need to name the column something different? I don’t know how I would rename a column header…

Thanks for your help.

image

@dr1992

Did you need all to be true or any one?

If any one then change and to or

Cheers

All will be true, but none are being removed.

@dr1992

They are case sensitive as well …please log and chekc

Cheers

I was going to run it again to get an example, but now it is saying ‘Filter Data Table: the value for argument ‘ColumnIndex’ is not set or is invalid.’

@dr1992

Please share a sample flow and file

cheers

I think I solved that, it was a scraping issue.

So, the EG:

This is the output, the highlighted words are what should be removed
image

And here are the two variables which should match this (pTrimtoRemove is the same as oInteriorTrim).

image

What am I doing wrong here?

@dr1992

If you want to remove them then use str.Replace(yourvariable,"")

cheers

You can do that from a data table?

@dr1992

Now I got your issue…

Ok so please use OR condition…And means all the 3 variables that you provided should be in the same row then it would remove…

If any of them is prsent and it needs to be removed then you have to use or condition

cheers

Ahhhh thank you for explaining! All sorted now!

1 Like

Hi @dr1992,

In addition to the Or logic as @Anil_G mentioned, I observe that you use the index 0 to point to your target column. I would suggest you use a declarative approach by specific the ColumnName instead of ColumnIndex.

But why?

  1. Ensures the code is interpret by others who will have to maintain your code
  2. In the future, if the index of target column for some reason changes within your datatable, a declarative approach will only look for the correct ColumnName , this will ensure your code is robust to future changes.

That issue was that it didn’t scrape properly to cause that. Column 0 is more reliable than a name should that change, this table is not my own and so I don’t control any changes.

It would need updating either way.

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