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 / Use a variable using S...
Power Automate
Answered

Use a variable using Send Keys with Power Fx

(0) ShareShare
ReportReport
Posted on by 60

Hi,

 

Probably super easy but since I'm not used to Power Fx I have a question. I'm about to try building a flow using the Power Fx-mode in PAD and need to Send Keys which contains a variable.. {Down}G{Return}{Tab}'Variable'. (The application does not have recognizable UI elements..) How do I do that? 🙂 

Thanks!

I have the same question (0)
  • Verified answer
    eetuRobo Profile Picture
    4,539 Super User 2026 Season 1 on at

     

     

    Simple way to do it is to use two Send keys -actions where in the second one you only use the variable.
    Like so: 

    eetuRobo_0-1707229986236.png


    But I also figured out how to do it in just one. Power Fx feature is still in preview so it wasn't very intuitive.
    I think it doesn't work if you copy and paste that text to Send keys Text to send though.

     

    eetuRobo_1-1707230464658.png

     

    You need to copy and paste this raw code to your flow:

    Copy:

    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $fx'"{Down}G{Return}{Tab}"' + $fx' NewVar' DelayBetweenKeystrokes: $fx'10' SendTextAsHardwareKeys: False

    Paste:

    eetuRobo_2-1707230745408.png


    The action should look like this:

    eetuRobo_3-1707230774748.png


    But if you now edit that action and save it breaks. So I would recommend just using two Send keys -actions.

  • vp-pengu1n Profile Picture
    60 on at

    Hehe, yeah I'll use two actions instead 😄 but thank you for coming up with solutions! 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard