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 / Help with random added...
Power Automate
Suggested Answer

Help with random added newline when trying to combine variables & plaintext as a path

(0) ShareShare
ReportReport
Posted on by 16
Hey,
 
 
 
I have a problem with a work project of mine. I'm trying to convert a power automate desktop workflow to be easily moved into different directories. The solution I've decided to try to go with is that I have a variable with most of the regular path and then add the more specific folders at the end manually. For some reason when trying to use this way power automate adds a linebreak/newline between the variable and plain text. Screenshot example from "Display message" action.
 
 
I've tried adding "trim text" action, doesnt help. I have trim command in the powershell script I use to create the variable aswell. I've tried with basic syntax tricks but if you have any idea what could help in this matter I'd very much appreciate it!
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Can you show your "Display message" -action in edit? What if you put the variable with the regular path and the ending path in a new variable? Does it add linebreak in between then or just when they are in "Display message" -action? Are you sure its not just that the Display message is too small of a window and so it has to show the whole thing in different lines and it just happens to separate them in between the variable value and plain text? Try using "Display Custom form" -action where you have the same text. Does it have the linebreaks then?
  • RikuNie Profile Picture
    16 on at
    Hey @eetuRobo,
     
    It adds the linebreak at least in "Move file(s)" action which I'm trying to get working. The display message was easiest way to show the added linebreak but you can see it in the error code aswell.
     
     
    I'm trying to achieve the base filepath into the variable so the subfolders could be added easily into the action as seen in the picture. There is a high chance that the
    file structure needs to be moved in our environment so the goal is to make transitioning the workflow as easy as possible.
     
    Any ideas are welcome why it does this!
  • Suggested answer
    RikuNie Profile Picture
    16 on at
    Ok so I figured it out. For some reason when using "run powershell script" action and using the result variable added the newline character. I changed it into using "set variable" and defining the path using this action and now it seems to work.
     
    Basically, over complicated the process.

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard