Hello Experts,
I need to seek for a solution for where i could make it work like scenario on below,
Example;
When column A “DATE” is today, then copy column B “JOB Number” data to a page column.
Example data file;
example.xlsx (14.1 KB)
Regards,
Fred
Hi @Alfred_Gan ,
We do have the input data but could you also show us what should be the Output data or where is the Page Column and how the value is to be added to that column ?
Hi @supermanPunch ,
Thank you for your promptly replied.
the output data would be the file as you see, if date is today, then copy job no says to google column
so the robot only intelligent to read that particular date for today, then copy the job number at the right column to says google column(example)
@Alfred_Gan ,
Considering you are reading the Excel sheet as a Datatable, we could get the Corresponding JOB Number/Numbers like below :
jobNumbers = DT.AsEnumerable.Where(Function(x)CDate(x("DATE").ToString).Date = Now.Date).Select(Function(x)x("JOB NO").ToString).ToArray
Here, DT
is the input datatable and jobNumbers
is a variable of type Array of String.
The Date matches multiple rows, hence used an array to store, if required a single value, You could Append .First()
to the expression to retrieve the First value from the Filtered rows.
Let us know if the expression is able to help you or if there are still issue that require help.
Hi @supermanPunch ,
Appreciate that if you could create a sample process flow so that is easy for me to capture the flow as you mentioned.
@Alfred_Gan ,
Check the below Workflow :
Filter_DT_BasedOnDate.xaml (5.4 KB)
It seems that the date is recognised as an OADate, hence the modification would be need to the above expression as shown below :
jobNumbers = DT.AsEnumerable.Where(Function(x)Date.FromOADate(CDbl(x("DATE").ToString)).Date = Now.Date).Select(Function(x)x("JOB NO").ToString).ToArray
hi @supermanPunch
It works perfectly base on your solution.
Thank you so much and i shall further apply base on my objective.
Would pm you if there is anything stuck from my side.
1 Like
system
(system)
Closed
October 28, 2022, 7:48am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.