RPA - Copy.xlsx (13.1 KB)
From Description Column i need TVS & BLANK ROW IN ANOTHER SHEET (FINAL 2)
" ONLY WITH INVOKE CODE "
DONE THIS WITH FILTER DATA TABLE AND LINQ
Whatever you write in assign for linq…is the same thing that you can copy to your incoke code and run it
Add argument for input and output datatables
Cheers
but first i have to filter the data table
so what i have to do can you please suggest
In invoke code use
Newdt = dt.AsEnumerable.Where(function(x) x("columnname").Tostring.contains("avc")).CopyToDatatable
This will filter columnname column in the give dt with avc
Hope this helps
Cheers
If i want a blank value from that column so i will leave blank in place of avc right?
You can use IsNothing(x("column")) orelse String.IsNullOrEmpty(x("Column").ToString.Trim)
Cheers
" and what if we need 2 data from a column one is blank and another one has value "
i am sorry i am learning and want to know about all conditions
You can include any number of conditions
(IsNothing(x("column")) orelse String.IsNullOrEmpty(x("Column").ToString.Trim)) AndAlso x("column2").ToString.Contains("acb")
Cheers
Main filter first.xaml (8.9 KB)
main final.xaml (13.8 KB)
RPA - Copy (4).xlsx (15.3 KB)
these are my linq data and excel file with result
when i am using this in Invoke Code the it showing me to many errors
if you are using any variables in the invoke code they have to be passed as arguments using edit arguments else they wont be recognized
please change accordingly
cheers
It says Current Row is not declared whether this invoke code is inside the For each row in datatable if not put into that
What is currentrow? is the datatype string? I beleive it should be datarow as per the name I see…and the functions you used
please declare the datatypes appropriately and link the variable to the argument to pass the data
Please show the complete code you have in invoke code to see what you are trying to do…Because I do not see any for loop to add currentrow in your invoke code piece
cheers
((IsNothing(x(“Description”)) OrElse String.IsNullOrEmpty(x(“Description”).ToString.Trim)) AndAlso x(“Description”).ToString.Contains(“TDS”))
(CurrentRow.Field(Of Double)(“Amount”)* -1)
(CurrentRow.Field(Of Double)(“SIGN”)* 10)
(CurrentRow.Field(Of Double)(“PERCENT”) - CurrentRow.Field(Of Double)(“SIGN”))
(Datediff(DateInterval.Day,DateTime.ParseExact(CurrentRow(1).ToString,{“dd.MM.yyyy hh:mm:ss”,“MM/dd/yyyy hh:mm:ss”,“MM-dd-yyyy”,“dd-MM-yyyy”},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None),now).ToString)
I am using this in invoke code
I still dont see any currentrow that you passed or declared as variable or argument…
That is the mistake in the code
Cheers
Where is the value to it?
And currentrow.Field is of type string is what you declared in the argument and currentrow.field is the direct name.which is wrong
Cheers