I am trying to use Power Apps to allow users to upload their training to a SharePoint document library with a specific file name for organizational purposes.
Files do upload correctly to SharePoint with a flow, without the 'update file properties' in power automation. I am having trouble taking first initial of the employees name and last name of the employee from the auto-populated field in my power app (David Humphrey). It is populated by setting the default property to User().FullName (1st image)
I would like to take the name, parse it, and save it to my SharePoint library as (dHumphrey_currentYear_Training1SelectedbyDropDown) and look like the second photo on the click upload.
Currently the code for the upload button OnSelect is:
UploadFileToSubTraining.Run( { contentBytes: First(att_SubmitTraining_AttachFile.Attachments).Value, name: First(att_SubmitTraining_AttachFile.Attachments).Name });
Below is my power automated flow: