Forum Discussion

Chris_Clark1968's avatar
Chris_Clark1968
Brass Contributor
Jul 20, 2022
Solved

A space appears in some of the records added via a for Powerapps

Hi,

I have a PowerApp that loads data into SharePoint, via a Form submission.  We have identified that some of the records for certain columns, contain a single space at the beginning?  

This seems to be having a knock on affect to the process of sending a mail out to them.  This is performed using a Flow.

Firstly Why would the happen randomly?
Secondly Is there a way to resolve this is SP or would it have to be resolved from the app?

  • ganeshsanap's avatar
    ganeshsanap
    Jul 28, 2022

    Chris_Clark1968 Did you try using Trim functions while patching data in SharePoint from power apps?


    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.

6 Replies

  • Chris_Clark1968 I would suggest you to correct this from Power app itself. So, you will not face any problem later while accessing this data from SharePoint.

     

    Check what is the formula used for these columns while saving data. If these are free text input fields on power apps form & users are entering (or copy/pasting data from somewhere) spaces in these fields, you can trim the spaces while saving the data using functions in power apps:

     

    You can use either of below functions as per your requirements:

    1. TrimEnds() - Removes all spaces from the start and end of a string of text but leaves spaces between words intact.
    2. Trim() - Removes all spaces from a string of text except for single spaces between words.

    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.

    • Chris_Clark1968's avatar
      Chris_Clark1968
      Brass Contributor

      ganeshsanap 

      I've found that another issue may have an impact on this.  I've raised another discussion but it seems that this is only happening when a group of people are being added.

      Weird characters are appearing before two fields Staff Name and Email.
      From the Powerapp these are Concat before being submitted to the SP site.  It seeems it started a few weeks ok.  The app has not been updated.

      The characters displaying are ⁢br>

      • ganeshsanap's avatar
        ganeshsanap
        MVP

        Chris_Clark1968 Can you show us the formula you used for these fields while saving the data?

        It will help us to identify the exact issue and provide you the precise solution.


        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.

Resources