Find children activity scope

Hi,

I’m using find children activity and trying to fill data in a table in web page. I’m iterating through the uielement for loop to enter the values in table. I need to move to another page while entering each row of data and comes back to the same page. How can I maintain the scope of find children activity to enter next row of data even after moving to another page in between?

Kind Regards,
Renju

@renjutom
Best would be to reexecute find children after webpage change and maybe it requires to be reflected on the selector (e.g. with dynamics)

My Answer assumes that you are doing a paging. Not addressed on what to do, if on the same page a new datapackage is post loaded

@ppr,

I’m taking main DIV as a filter for find children. And I’m trying to insert value for each row. I need to click on each row after filling the data in that row, move to another page, enter some data in that page and comes back to the same page to enter next row of data. I’m iterating through the for loop of uielement to fill the data in each row of table. How can I identify the next row using find children even after visiting another page in between.
Kind Regards,
Renju

@renjutom
CAN you share a Screenshot or a symbolic graphic for the case. This would Help us to find a common wording and undestanding of the case

Hi @ppr,

My workflow looks somewhat like this.

find_children3

Kind regards,
Renju

@renjutom
Thanks for your answer. Some screenshots, or visuals on the Website would be helpfully. The Part movng the page, how Looks the source fronwhere the find children Activity is retrieving the Elements … would be helpfully

@ppr,

I will attach the image of table to insert data. After inserting values in each row, I need to double click on that row and it redirect to next page to insert remaining data of that particular item. After that it will come back to the same page to insert the 2nd row of data.
Kind Regards,
Renju
screenshot

Perfect this helps a Lot. So Just Help me in following. From where you get the Data Datatable the you Insert. What excactly ist doing find children

@ppr,

I’m getting the data from the excel sheet. Actually, I need to fetch data from 2 sheets of excel sheet. And I will insert data into this table in web page based on a common value in both sheets. The excel sheet is having many item number. First I read the first item number from data table created with excel sheet and insert that data in first row of table in web page. Next I will search the same item number in datatable and fetch that row of data and insert that data in web page. If there is no more same item number available in datatable, we will take the next item number and insert all data corresponding to that item number.
Kind Regards,
Renju

@ppr,

Do you have any idea ? Could you please suggest me how can I do this?

Kind Regards,
Renju

@renjutom
give a try on following:

  • readin excel
  • for each row - iterate over dt
    • use index from the for each output to get the loop counter
    • use the loop counter for dynamic selectors and fill out the rows (in case of you have to track it)
    • Fork to the other page and do entry
    • Return Back (do some row interation closing work if it is needed)

And finally let end your flow - maybe do some final closing work.

This could be the base pattern. The question on the details to what is find children is handling remains still open.

1 Like

I agree with what @ppr mentioned previously. I think he’s suggesting you don’t really need the find children activity at all, which is what I’m inclined to believe. You need to use an index counter that is shared between the datatable and the web page elements. So your selector might look something like:
<webctrl ... idx='" + indexCounter.ToString + "' ... />

Note that the idx value may start on 2 or something, and if your indexCounter variable is zero-indexed you will need to reflect that in the selector as such:
<webctrl ... idx='" + (indexCounter + #).ToString + "' ... />

You can loop until the element doesn’t exist, and if it doesn’t, go to the next page. This would also have to be reflected in the selector though, so you could have two index counters, one that tracks the place in your datatable, and one that tracks your place on the page. So when you go to the next page, reset that variable to the default value again, but retain the index counter that corresponds to the place in the datatable.

Hi @mike.vansickle,@ppr,

I tried using counter variable in selector of type into activity to insert value in each row. But it is not inserting the value. Actually, there is a textbox in each cell for inserting the value. So if we use counter variable in selector, it will identify the cell but it won’t insert value in that cell.

Kind Regards,
Renju

Are you able to find the textbox element and reference the selector you’re using currently with the counter variable as a parent element?

So if for example <webctrl ... idx='" + indexCounter.ToString + "' ... /> is the element that contains the text box, and the text box is something like <webctrl ... Tag='INPUT' ... />

You can then build a selector like the following:

<webctrl ... idx='" + indexCounter.ToString + "' ... />
<webctrl ... Tag='INPUT' ... />

So this selector will find the elements you want to iterate through, and then it will find it’s child element with a text box input field.

Hope this helps.