# Count data rows including the NextLinkSelector

**URL:** <https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043>\
**Category:** Studio\
**Tags:** uiautomation, activities\
**Created:** [April 28, 2023, 9:45am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043 "2023-04-28T09:45:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 9:45am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/1 "2023-04-28T09:45:37Z")

</div>

Hi there,

i am trying to count data rows on a website and the workflow should run to the next page.  
First of all, i use Try Catch Activity. Inside, i put Click Activity to click on **Details** as you can see in the following picture:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/3/8/9/389e82a7333e8087580214d61e020ceaf1c39129.png)

I noticed that by clicking on the first Details, it considers the heading as the first table row, that is why i set **i = 2** as the first table row. Then i made it as a dynamic selector for the Activity. See the following Bild:

 ![image](https://global.discourse-cdn.com/uipath/original/4X/d/2/f/d2f15aa4bcc712faebd3201afc1abf2789250c1b.png)

When the Workflow realize that there is a next page, i used a Click Activity to Click on arrow Next ( See the following Picture)

 ![image](https://global.discourse-cdn.com/uipath/original/4X/b/7/d/b7d6f7e188793b111e89faad61d5410a5cf98f44.png) and a made an Assign that he should restart consider the first Table row of these next page as 2. And he should finally click on **Details**.

Now the issue is at this point: he can’t stay on the new page, but he goes back on the first page.  
How can i get a solution please?

---

<div class="post-metadata">

**Author:** ![LAKSHMI\_NARAYANA\_PEMMASAN](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshmi_narayana_pemmasan/32/375751_2.png) [@LAKSHMI\_NARAYANA\_PEMMASAN](https://forum.uipath.com/u/LAKSHMI_NARAYANA_PEMMASAN)\
**Post date:** [April 28, 2023, 9:58am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/2 "2023-04-28T09:58:29Z")

</div>

is their any specific reason to use this way , as you use the table extraction and later you can count the rows using assign activity

Regards

---

<div class="post-metadata">

**Author:** ![Palaniyappan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/palaniyappan/32/524095_2.png) [@Palaniyappan](https://forum.uipath.com/u/Palaniyappan)\
**Post date:** [April 28, 2023, 10:00am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/3 "2023-04-28T10:00:12Z")

</div>

Hi

if your requirement is to extract data from each page of a website then we can do that DATA EXTRACTION which can avoid all these clicks of next pages

Would recommend to have a view on this doc of how to use this activity

> **[Web Data Extraction Automation](https://www.uipath.com/learning/video-tutorials/web-data-extraction-automation?hs_amp=true)**
>
> Web data extraction using UiPath. Automate rule based business and IT processes
> Robots that manipulate other softwares like a human.

Cheers @ANGE

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 10:07am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/4 "2023-04-28T10:07:19Z")

</div>

Hi @Palaniyappan thanks for your reply. I already use Data extraktion . Now the Problem is, i should click on each rows to get specific informationen.

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 10:09am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/5 "2023-04-28T10:09:21Z")

</div>

Hi @LAKSHMI_NARAYANA_PEMMASAN , yes, after scraping the data, i should click on each rows to get specifics informationen.

---

<div class="post-metadata">

**Author:** ![LAKSHMI\_NARAYANA\_PEMMASAN](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshmi_narayana_pemmasan/32/375751_2.png) [@LAKSHMI\_NARAYANA\_PEMMASAN](https://forum.uipath.com/u/LAKSHMI_NARAYANA_PEMMASAN)\
**Post date:** [April 28, 2023, 10:20am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/6 "2023-04-28T10:20:03Z")

</div>

have you checked for each ui element ,

you can use do while activity as well

once the page is completed you can check for next button and if present click on it

and same repeats

Reagards

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 10:23am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/7 "2023-04-28T10:23:50Z")

</div>

Hi @LAKSHMI_NARAYANA_PEMMASAN let me try.

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 10:29am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/8 "2023-04-28T10:29:18Z")

</div>

Hi @LAKSHMI_NARAYANA_PEMMASAN i only have For Each Workflow as Activity. It’s the same like For Each Uielement?

---

<div class="post-metadata">

**Author:** ![LAKSHMI\_NARAYANA\_PEMMASAN](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lakshmi_narayana_pemmasan/32/375751_2.png) [@LAKSHMI\_NARAYANA\_PEMMASAN](https://forum.uipath.com/u/LAKSHMI_NARAYANA_PEMMASAN)\
**Post date:** [April 28, 2023, 11:17am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/9 "2023-04-28T11:17:17Z")

</div>

it is different ,

refer below thread for details

[https://forum.uipath.com/t/is-there-any-way-to-get-all-h3-text-off-of-a-website-not-just-the-first-instance/423926/3](https://forum.uipath.com/t/is-there-any-way-to-get-all-h3-text-off-of-a-website-not-just-the-first-instance/423926/3)

you will get an idea of for each uielement

regards

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [April 28, 2023, 7:44pm UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/10 "2023-04-28T19:44:48Z")

</div>

@ANGE

Looks like the selector you are using is redirecting it to first page…

Can you check the selector of click and also can you show the loop and vbrowser activity…mostly browser activity might be redirecting…

Try changing the selector to not include any first page details

Cheers

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 8:10pm UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/11 "2023-04-28T20:10:45Z")

</div>

Hi @Anil_G Thanks for your reply. Can i send you the link in private? Because it’s an internal project.

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [April 28, 2023, 8:12pm UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/12 "2023-04-28T20:12:03Z")

</div>

@ANGE

Yes please …If I can access I can look into it

Cheers

---

<div class="post-metadata">

**Author:** ![ANGE](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ange/32/375742_2.png) [@ANGE](https://forum.uipath.com/u/ANGE)\
**Post date:** [April 28, 2023, 8:29pm UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/13 "2023-04-28T20:29:07Z")

</div>

How can i write you in private please?

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [April 29, 2023, 4:40am UTC](https://forum.uipath.com/t/count-data-rows-including-the-nextlinkselector/540043/14 "2023-04-29T04:40:11Z")

</div>

@ANGE

You can click on my name it would show message option click on it

Cheers
