# Extract Data - next page

**URL:** <https://forum.uipath.com/t/extract-data-next-page/357666>\
**Category:** Studio\
**Tags:** question, studio, uiautomation, activities\
**Created:** [November 1, 2021, 11:20am UTC](https://forum.uipath.com/t/extract-data-next-page/357666 "2021-11-01T11:20:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![prititit](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prititit/32/176941_2.png) [@prititit](https://forum.uipath.com/u/prititit)\
**Post date:** [November 1, 2021, 11:20am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/1 "2021-11-01T11:20:34Z")

</div>

I have to scrape the data and click the arrow per document and get the text inside.

Every time it goes on the next page, the counter will continue the loop (samples 27, 28, 29). But the row should be back to row’1’ (samples 1,2,3) On the next page.

How to go back to row’1’ if you’re on the next page?

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [November 1, 2021, 2:22pm UTC](https://forum.uipath.com/t/extract-data-next-page/357666/2 "2021-11-01T14:22:51Z")

</div>

@prititit

If the element of the next page is not identified it will raise the exception, you can make it in try-catch and point to the row1

But can you provide the screenshot of the element so that it will be clear

Thanks

---

<div class="post-metadata">

**Author:** ![Krishna\_547](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/krishna_547/32/523995_2.png) [@Krishna\_547](https://forum.uipath.com/u/Krishna_547)\
**Post date:** [November 1, 2021, 4:08pm UTC](https://forum.uipath.com/t/extract-data-next-page/357666/3 "2021-11-01T16:08:57Z")

</div>

Hi @prititit

Please elaborate on your question, row’1’ is your start index on the next page?

---

<div class="post-metadata">

**Author:** ![prititit](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prititit/32/176941_2.png) [@prititit](https://forum.uipath.com/u/prititit)\
**Post date:** [November 2, 2021, 4:41am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/4 "2021-11-02T04:41:08Z")

</div>

hello @Krishna_547

yes. row 1 should be the start index of the next page.

But it indicates row 26. since the last row of the first page is row 25

---

<div class="post-metadata">

**Author:** ![Kalees9486](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kalees9486/32/63048_2.png) [@Kalees9486](https://forum.uipath.com/u/Kalees9486)\
**Post date:** [November 2, 2021, 4:49am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/5 "2021-11-02T04:49:21Z")

</div>

Hi @prititit ,

Try using Table Scraping (earlier named as Data scraping).

 ![image](https://global.discourse-cdn.com/uipath/original/4X/0/5/6/056bc3f94db5f0621343fa3421bb1593a8398890.png)

Thanks,  
Ashwin

---

<div class="post-metadata">

**Author:** ![prititit](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prititit/32/176941_2.png) [@prititit](https://forum.uipath.com/u/prititit)\
**Post date:** [November 2, 2021, 4:54am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/6 "2021-11-02T04:54:29Z")

</div>

[2. Extract data.xaml](https://forum.uipath.com/uploads/short-url/kRPiKfZVXCg3GhHz6ZdlT7djolg.xaml) (24.2 KB)

Hello @Krishna_547

This is my xaml file.

1. Scrape table without next selector
2. Loop click of the arrow to get the docu # inside
3. Click next page.

Issue: everytime it goes to the next page, it should scrape again and click again the first row.

And this is the website.

“[https://developer.uspto.gov/ptab-web/#/search/documents](https://developer.uspto.gov/ptab-web/#/search/documents)”

 ![image](https://global.discourse-cdn.com/uipath/original/4X/a/e/8/ae8d275f22b09f87f5b999ecf0750c5655dfdb0a.png)

---

<div class="post-metadata">

**Author:** ![THIRU\_NANI](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/thiru_nani/32/317561_2.png) [@THIRU\_NANI](https://forum.uipath.com/u/THIRU_NANI)\
**Post date:** [November 2, 2021, 6:15am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/7 "2021-11-02T06:15:34Z")

</div>

Hey, I think you has given number of results to 100 while scraping the data. make it to 0. then indicate it on to the next page.

I hope this will works for you!

Regards,  
NaNi

---

<div class="post-metadata">

**Author:** ![Krishna\_547](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/krishna_547/32/523995_2.png) [@Krishna\_547](https://forum.uipath.com/u/Krishna_547)\
**Post date:** [November 2, 2021, 7:38am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/8 "2021-11-02T07:38:34Z")

</div>

Hey @prititit ,

You have used a counter inside for each and for each page you can see only “25”, after that once you click on the next arrow you must have to reinitialize your counter so that the click happens from the start of the rows again on the next page.

Follow below steps,

- Firstly check your ExtractDataTable definition, it should look like below,

![image](https://global.discourse-cdn.com/uipath/original/4X/3/e/1/3e1a4e103b3532a0dbbc9aead30502cde43afc6b.png)

- Inside for each, use If Condition to check the counter, if the counter equals 26 then the bot has to click on the next page and also reinitialize counter back 1(the start index of the next page)

HAPPY AUTOMATION !!!

---

<div class="post-metadata">

**Author:** ![prititit](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prititit/32/176941_2.png) [@prititit](https://forum.uipath.com/u/prititit)\
**Post date:** [November 2, 2021, 10:26am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/9 "2021-11-02T10:26:21Z")

</div>

Hello @Krishna_547

Do you have a sample for this one? I don’t know how to put it in the uipath studio ☹

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [November 5, 2021, 10:27am UTC](https://forum.uipath.com/t/extract-data-next-page/357666/10 "2021-11-05T10:27:09Z")

</div>

Closed on November 5, 2021, 10:27am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
