I am still very new to Power Apps and this is my first application build. Apologies if this is a duplicate post, but I wasn't able to locate
I'm in the process of creating a new Power Solutions but having issues with display a varbinary(max) field into a text
- SQL Server backend (condensed data sources and normalized)
- Each Screen will be a drill down into modifying /updating record details of an operational task
- Some records have to verify either an image or PDF upload (can accept multiple files)
- Images and PDF files are originally collected from a webhook and inserted into the varbinary field as well as a Image Type field (image/jpg value)
- Images are stored on the SQL database only and are not stored on network drive, SharePoint List or SQL FileStream reference
- Created a secondary column to convert varbinary(max) to varchar(max)
Main Issue:
- Obvious issue - Power Apps doesn't directly display/show varbinary(max) within an Image Control
- Unable to show the varchar(max) within a Form / Image Control correctly
Found this to use within the Image Control
"data:image/jpeg;base64," & ImageUpload
Troubleshooting:
- Several online searches for this scenario but can't get a clear resolution to the formula/conversion needed to correct the display problem
Conversion Code used for the varbinary field type to varchar:
CAST('' as xml).value('xs:base64Binary(sql:column("CommunityProjects.ImageUpload"))', 'varchar(max)')
Note: The above I am still questioning if the CAST syntax is correct for what Power Apps needs.
Other considerations:
- Not sure if I have all the Property values correct
- Possible the original webhook collected did not collect all the information required for the field type conversion that is preventing the image display
Still testing other areas, but if someone has come up with a more elegant solution, I would love to try it out.