Views:
Applies to Product - Power Apps

What’s happening?
The Absolute### property in PowerApps fails to correctly encode the '#' character in hyperlinked filenames when uploading attachments to a SharePoint list. The expected URL should replace '#' with '%23', but the actual URL retains the '#' character, preventing access to the attachment.
 
Reason:
This is related to the limitations in SharePoint and OneDrive regarding special characters in filenames. SharePoint does not support uploading files with special characters, which affects the encoding in PowerApps.
 
Resolution:
To work around this, the following Power Fx formula can be used to ensure that special characters, including '#', are properly encoded:
plaintext Concat( ThisItem.Attachments, "<a href='"" & Left(Absolute###, Find(""/"&ThisItem.ID&""/"", Absolute###) + Len(""/"&ThisItem.ID) ) & EncodeUrl(DisplayName) & ""'>" & DisplayName & "</a>", "<br/>" )
This formula constructs the hyperlink by: - Using the Left function to extract the part of the URL up to and including the item ID. - Using the EncodeUrl function to encode the display name, ensuring that any special characters in the display name are properly encoded.
If the issue persists, it is recommended to rename the files to exclude any special characters before uploading them to SharePoint.