web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PA Desktop RPA: Loop t...
Power Automate
Answered

PA Desktop RPA: Loop through each value in a column and copy/paste it's contents to another application help

(0) ShareShare
ReportReport
Posted on by 14

Hi all,

 

Here's the sketch code I had in mind and I'm trying to make it come to life:

 

Get content of list/table of Item Number and Loop through each Item Number

 

For each Item Number

1. Copy it's value

2. Paste into another application through (ctrl+v)

 

So far, I've managed to able to loop each Item number but not sure how to copy it's value or if the value is correct.

 

Thank you!

 

samsa18_0-1707354156424.png

samsa18_1-1707354294742.png

 

 

  • WillSG Profile Picture
    352 Moderator on at

    Hi @samsa18  I hope you are doing well.

     

    Here on the image below you can see my recommendation.

     

    My process recommendations step:

     

    1. When you use the For Each Action, each value is saved in the variable %CurrentItem%, this means that every loop cycle, the variable will contain the columns C numbers. Note: there is no need to have the Copy Cells from Excel action.
    2. So, the action #6 in the image below will send the key “Tab” and the Text contain in the variable.
    3. In addition, instead of using, multiple actions such as Move Mouse and Send Keys, you can use only the Send Key action and setting up to Move to XY coordinates prior to click, even you can set up a waiting time before do the Click.

     

    Please let me know if it works, happy automation!,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

     

    WillSG_Screenshot 2024-02-07 210649.png

  • UshaJyothiKasibhotla Profile Picture
    229 Moderator on at

    Hi @samsa18 

     

    You can also try it another way

    as I have observed you have read the excel sheet, output as Exceldata and looping through it each currentitem

    So you can directly call the values from the data table like currentitem[columnindex/columnname]

     

    Use populate text field in window/populate text field webpage ad give the input as 

    currentitem[columnindex/columnname] as shown in the image

    UshaJyothi20_0-1707378413604.png

    Hope this helps,

    Usha

     

  • samsa18 Profile Picture
    14 on at

    Thank you for the helpful tips.

     

    Do you know how to fix this error. 

    samsa18_0-1707418881390.png

     

  • Verified answer
    WillSG Profile Picture
    352 Moderator on at

    Hi @samsa18  I hope you are doing well.

     

    That’s interesting, are you using the same set of numbers defined on colum C?

     

    If yes, I don’t see why you are getting this error, copy and paste this action below and tested again.

     

    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''{Tab} %CurrentItem%''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False

     

    Also, delete action #7 on your code which is no longer required.

     

    Finally, you can also use the action “Populate on Window”, to populate the %CurrentItem% number into your application, instead of using the Send Keys actions. However, if it is a virtual environment, I understand why your are using the Send Key actions.

     

    Hope this help,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard