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 / Flow Removes Spaces fr...
Power Automate
Answered

Flow Removes Spaces from Text Fields (Excel Online-->SharePoint) -- How to Prevent This??

(0) ShareShare
ReportReport
Posted on by 56

Hello! I'm developing a flow that reads an Excel Online worksheet and loads its contents into a SharePoint list. I've mapped all my fields to/from the correct sources and destinations, but now that I run the flow, all of my text fields in the SharePoint list have the spaces removed. For example in my Comments field, where my Excel reads "This is a comment," my result in SharePoint reads "Thisisacomment".

 

How can I prevent this? On my first try, I simply mapped the Excel fields using dynamic content, but encountered the error. Then I tried to map using the expression item()?['fieldname'] , but this did not help.

 

I'm doubly concerned because I have another field which is a lookup field in SharePoint. I get the lookup value by using a variable in my flow, but this method also removes the spaces from the text, and therefore I can't locate a matching value, so my result in SharePoint is blank for the lookup field.

 

How can I prevent this also?? Many thanks!

Categories:
I have the same question (0)
  • dfmaxwell Profile Picture
    56 on at

    Thanks very much for your expert assistance! I hope you have a happy and healthy new year.

  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Could you try that approach?

     

    use compose action before creating the item action and place the dynamic content in that , run the flow and see what is the value of that ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • dfmaxwell Profile Picture
    56 on at

    No I don't believe the flow checks the value in the manner you described.

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Before updating the SharePoint with that excel dynamic content, did you tried to check what is value present in that dynamic content by using compose action ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • dfmaxwell Profile Picture
    56 on at

    The flow does not use a Replace function. Thank you 

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Just wondering whether any replace operation has been done on field before updating it in create list ?

     

    could you confirm that ?

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • dfmaxwell Profile Picture
    56 on at

    I will definitely try your suggested script! I may not be able to do it today, but I promise to mark this thread as resolved if and when it works.

     

    To clarify, there is no error message. The flow succeeds, so the error I'm referring to is in the output when the spaces are removed from the text fields.

     

    Many thanks again, I'm looking forward to trying out your proposal.

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @dfmaxwell 

     

    Ok got it now.

     

    So coming back to this,

    Nived_Nambiar_0-1703874207509.png

    May i know few things ?

    1. What error you got when you used excel's dynamic content ?

    2. instead of item()?['fieldname'] could you try items('Apply_to_each_(MainOuter)')?['fieldname'] ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

     

  • dfmaxwell Profile Picture
    56 on at

    Of course, thank you for your reply.

     

    The variables are used for the lookup fields. For example, let's say I'm looking for TeamName which is used as a drop-down value (lookup field) and the drop-downs are managed in the TeamNameList (SharePoint list). The flow takes the text value for TeamName in Excel, locates the matching value in the TeamNameList, and returns the TeamName ID from TeamNameList by entering it into the SharePoint list that I'm updating in the Create Item step.

     

    As you can tell from the screenshot, I initialize the variables at the beginning of the flow. I SET the variables when a matching text value is found between Excel and TeamNameList. In the Create Items step, I map the variable using dynamic content.

     

    I hope this explanation helps and I truly appreciate your assistance. I'm traveling right now and have a difficult time creating new screenshots.

     

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2025 Season 2 on at

    Hi @dfmaxwell 

     

    for better clarification, could you explain me what is the condition you are looking and the variables values it is assigned in highlighted area as shown below?

    Nived_Nambiar_0-1703773949608.png

     

    That would help to find the error reason 

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard