My usecase is get latest job and company name and location …and get which location has a more jobs need to show highest job location …
Hello @nirmalad123
-
Read Job Data:
- Use Read Range activity to read job data from Excel or CSV into DataTable (e.g., dtJobs).
-
Sort Jobs by Date:
- Use Sort DataTable activity to sort dtJobs by the Date column in descending order.
-
Retrieve Latest Job:
- Assign latestJobDataRow = dtJobs.Rows(0) to get the first row (latest job).
-
Group by Location:
- Use Group By activity or LINQ to group dtJobs by the Location column, counting the number of jobs in each location.
-
Find Location with Most Jobs:
- Assign highestJobLocation = dtJobs.Compute(‘MAX(JobCount)’, String.Empty) to find the location with the most jobs.
-
Display Results:
- Use Log Message activities to display the latest job information and the location with the most jobs.
Example:
- Log Message: “Latest Job Information: #{latestJobDataRow[“JobID”]}, Company: #{latestJobDataRow[“CompanyName”]}, Location: #{latestJobDataRow[“Location”]}”
- Log Message: “Location with Most Jobs: #{highestJobLocation}”
Thanks & Cheers!!!
dt_price.AsEnumerable.OrderByDescending(function(x) x(“Jobs”)).First().Item(“Location”)
Cheers!!