Forum Discussion

jspengler's avatar
jspengler
Copper Contributor
Apr 20, 2023

Sharepoint Lists hide white space in values

I was recently trying to compare two value (in power automate) and it said they did not match. But when looking in sharepoint at the list they seemed to match. It turns out one of the fields had an extra space in it. But it's impossible to see that extra space without going in to edit the value. In the list it hides any extra spaces. Even right click>Copy Field to Clipboard copies the modified value, not the actual value. You must click into the field like you are going to change it to see more than one space.

 

 

  • jspengler How are you entering data in SharePoint list, manually typing or copying from somewhere?

     

    There is replace() function in Power automate which you can use to replace multiple white spaces with single white space. Use flow like below to remove all extra spaces between the words, at the start and at the end of the string variable: 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

    • jspengler's avatar
      jspengler
      Copper Contributor

      ganeshsanap This was less about finding a solution and more about documenting the unexpected way that sharepoint works for others benefit.

       

      The data was added to the sharepoint list by some other user, and it was likely a mistake that they entered an extra space. I removed the extra space to correct the issue. It was mostly confusing that the extra space didn't exist in most the ways of viewing the field, like Copy field to Clipboard.

       

      But yes, your power automate flow would be a good way of procedurally suppressing extra spaces as needed. I would probably use it to update the original item to permanently remove the extra spaces.

Resources