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

Notifications

Announcements

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,204 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard