There is an error of assign the filter table, Can anyone help me to check on it and revise the path using my workflow? Thanks!
I need to classify the data based on “Type of sample” to different sheet.
This is the main sheet:
If the those data’s “Type” is 3N, 4N, KR, Kw(Pd), Kw(Ni), Ky, then all data will go to sheet “MU-bias (Within Range)”, like this sample:
But if those data’s “Type” other than 3N, 4N, KR, Kw(Pd), Kw(Ni), Ky, then all data will go to sheet “MU-bias (OUT Range)”, like this sample:
Workflow
Main MU-bias in-outrange.xaml (45.0 KB)
excel
WB templ. 27.2.24.xlsx (85.5 KB)
Hai @Happydayyy
Remove the double quotes and re-type it do not copy and paste it.
After i retype “”, there is another issue. May I ask why happen this?
vrdabberu
(Varunraj Dabberu)
March 6, 2024, 11:31am
5
Hi @Happydayyy
Try with the below query once:
Maintb.Select("Type = '3N' OR Type = '4N' OR Type = 'KR' OR Type = 'Kw(Pd)' OR Type = 'Kw(Ni)' OR Type = 'Ky'").CopyToDataTable()
Regards
How about
How I can revise the outrange one?
lrtetala
(Lakshman Reddy)
March 6, 2024, 11:34am
7
@Happydayyy
Can you try with Filter Data Table activity
This one I try before, the result will be
Yet, my expected result is:
Therefore, I am trying to use the assign activity
ppr
(Peter Preuss)
March 6, 2024, 11:47am
9
we can shorten it with LINQ
Assign Activity
dtFiltered =
From d in Maintb.AsEnumerable
Let arrFilter = new String(){"3N", "4N" , "KR" , "Kw(Pd)" , "Kw(Ni)" , "Ky"}
Let chk = arrFilter.Contains(d("Type").toString.Trim)
Where not chk
Select r = d)).CopyToDataTable()
Handling empty Filter Results
This FirstAid Tutorial will describe how a the source contains no DataRows EXCEPTION can be handled.
Introduction
Let’s have a look at the following filter data table scenario:
Name
CCode
Tom
US
Charlotte
FR
Seema
IN
Jean
FR
Assignment:
Filter all rows on a particular Country Code like FR, UK, ES, UK…
Ensure that all CCode data column values are trimmed
Ensure that the Filter check is case insensitive
we can implement it e.g. with the help of a LINQ statement:
dtData.AsE…
Also when working with the Select Function (which is not the Select Operator) we do have the IN statement
this seems too difficult for me, I prefer a simpier one although it is longer
Do u know how i can solve this issue using this method?
ppr
(Peter Preuss)
March 6, 2024, 12:03pm
12
Happydayyy:
There still has an error
the used syntax is not the needed syntax
how can i revise it?
Maintb.Select(“Type of sample = ‘3N’ OR Type of sample = ‘4N’ OR Type of sample = ‘KR’ OR Type of sample = ‘Kw(Pd)’ OR Type of sample = ‘Kw(Ni)’ OR Type of sample = ‘Ky’”).CopyToDataTable()
Thank you!
Can anyone share the workflow to me so that i can have a look on how to write on it. Thanks!!!
ppr
(Peter Preuss)
March 6, 2024, 12:09pm
15
Can you illistrate me how I can revise the error assign activity? The link seems cant work in my case
because the output should be like this:
ppr
(Peter Preuss)
March 6, 2024, 12:35pm
18
@Happydayyy
the link is about the Syntax (was also used longertimes by Microsoft itself within their help pages)
the screenshot above shows that it is working
we can also swap the not:
Rnd can you do within the debugging panels:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum
So all power and Building blocks are with you
I added, but there is still an error
Can anyone show me an example workflow in my case? Many thx!