Read DataTable, and search specific field

Hi Again

I appreciate your orientation or help, with next secuence

I’m working with a tickets system, and trying to do auto-Management of license support tickets
After many tries I’ve achieve:

  • Login on system
  • Apply some Filters the system
  • Search with key word
  • Save data in DataTable also in Excel
    But there is a field that its necessary, and I only will extract it opening the ticket online.
    If in dataTable, there are more than one row, i’ll be neccessary open ticket one by one.

Til this momment I’m not able to achieve read dataTable and go to searh this specific info in tickets system (i’ve tryed with try catch, but doesn’t work).
Then this field it was extracted, paste it in my excel sheet in respective ticket number…to finally run a VBA macro that i’ve generated previously.

Thanks at all

Hi @Francisco_Morales

It seems like your process is well established and you only need some basic guide :slight_smile:

To complete your process, I would suggest to:

  1. Read the Excel file into the memory as a Data Table using Read Range activity. You might want to first add header names to your columns in the Excel for easier reference.
  2. Use For Each Row activity on the loaded Data Table
  3. For each row, take the item row.Item(“your1ColumnName”).ToString → this piece of code will give you 114207, then 118471, and so on…
  4. Use that to open your ticket and extract the value for that row (using Get Text activity with a proper selector should do the trick)
  5. You can now write your value into the Data Table you have in the memory with a simple Assign activity:
    row.Item(“PC ID”) = theValueYouJustGotFromTheWebsite
  6. Resave the Data Table to your Excel file/new Excel file with Write Range activity

I hope it helps a bit :slight_smile:

3 Likes

Thanks for your tips
I’m in the foreach step and with a message box, I’ve comprobed that the box shows me each Ticket ID.
I’m almost to get It.

I’ve not able to finished It yet

The tickets were found one by one with “For Each”, but only gets one PC ID from the ticket and it’s copied the same in colum “PC ID” of all rows.
I Did a vídeo to explain it better

maybe an “IF” is missing?
Thanks

I’m in the step 5,
I got text from PC ID web and save in pcid variable
I’ve assigned to row.Item(“PC ID”) = pcid . Close the ticket and then save with write range.
The problem is that only save the first pcid found
Please see this image of the secuence insite de For Each Row

Thanks for all your comments