Forum Discussion
A space appears in some of the records added via a for Powerapps
- 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.
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:
- TrimEnds() - Removes all spaces from the start and end of a string of text but leaves spaces between words intact.
- 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.
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>
- ganeshsanapJul 21, 2022MVP
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.
- Chris_Clark1968Jul 25, 2022Brass Contributor
ganeshsanap
Once the group (2 or more) are selected from the search screen they appear in the 'Groupform'The Submit button becomes active once the required fields have been completed.
The submit button, 'On Select' isWith(
{
'Staff Name': Split(
StaffName.Text,
","
),
JobTitle: Split(
JobTitle.Text,
","
),
Email: Split(
Email.Text,
","
),
'Ward Name': Split(
WardName.Text,
","
),
Divison: Split(
Division.Text,
","
)
},
ForAll(
Sequence(CountRows('Staff Name')),
Patch(
'Clinical Supervision',
Defaults('Clinical Supervision'),
{
'Staff Name': Last(
FirstN(
'Staff Name',
Value
)
).Result,
'Job Title': Last(
FirstN(
JobTitle,
Value
)
).Result,
Email: Last(
FirstN(
Email,
Value
)
).Result,
'Ward Name': Last(
FirstN(
'Ward Name',
Value
)
).Result,
Supervisor: Supervisor.Text,
'Supervision Subtype': SupervisionSubtype.Selected,
'Other Reason': OtherReason.Text,
'Supervision Type': SupervisionType.Text,
'Supervisor Email': SupervisorEmail.Text,
'Reflections Actions': ReflectionsActions.Text,
'Date Supervision': SupervisionDate.SelectedDate
}
)
)
);
Notify(
"Clinical Supervision Group Form",
NotificationType.Success,
5000
);
Navigate('Home Screen')
It only seems to happen periodically??Update 28/07
Looking at the SP site recently, the 'weird' characters seemed to have changed to just <br> which seems to suggest this is an HTML issue but not sure how as no HTML is used in the formula????- ganeshsanapJul 28, 2022MVP
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.