cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Azure SQL DB Data Source. Options for displaying images.

My Data source is Azure SQL DB and I would like to display data sources in my application.

 

I have found that varbinary(max) is incompatible with PowerApps, so tried using an Image column instead. The image column did not display my images despite multiple refreshes of the data (I loaded the image data via a linked table in Access for simplicity - the images show up in Access so I presume they are loaded correctly).

 

I have also attempted loading the images into a SharePoint document library (in the same SharePoint/Office365 tenant that has my PowerApp) and then storing a link in a text field. The images do appear in the Web Editor (assuming I am also signed into the Office 365 account) but do not appear on mobile devices even though I sign into the Office 365 account.

 

Has anyone got images working reliably with an Azure SQL DB data source? If so, please share your secrets!

 

Thanks

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Level 10

Re: Azure SQL DB Data Source. Options for displaying images.

Please try to load the image from PowerApps.

You can try to use the Add image control, that worked for me.

12 REPLIES 12
Community Support Team
Community Support Team

Re: Azure SQL DB Data Source. Options for displaying images.

Hi PaulD1,

 

Thanks for feedback.

 

I assume that this thread about “SQL Images not displaying in App consistently” could be a reference for you, @Meneghino has some suggestions on this issue, please check it at here:
https://powerusers.microsoft.com/t5/PowerApps-Forum/SQL-Images-not-displaying-in-App-consistently/m-...

 

I will try to report this issue on my side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Level 10

Re: Azure SQL DB Data Source. Options for displaying images.

hi @PaulD1

could you please outline how to reproduce the issues with the image type column?
thanks.

Super User
Super User

Re: Azure SQL DB Data Source. Options for displaying images.

Thanks @v-yamao-msft

 

Yes, I read that thread and so changed from Varbinary to Image, but still no luck. So I tried storing a path instead. 

 

The image paths point to a library on the SharePoint site of the same Office 365 'tenant' (terminology?) where the published PowerApp is located. In the browser, as long as I have signed into my Office 365 account, the images appear, but on a mobile device, they do not.

 

If I choose the Path route - how/where can I store the images so that the will appear on mobile devices?

 

I am currently investigating making my app offline-capable so may go back to trying to use the Image column instead assuming the image data would be cached to the local collection in the same way that other fields are.

 

Thanks

Paul

Super User
Super User

Re: Azure SQL DB Data Source. Options for displaying images.

Hi @Meneghino

 

I create an Image column in Azure SQL DB. I create a link to the table in MS Access and view the table. I right click an entry in the Image column and choose to Insert. From the dialog that appears, I choose 'From File' and then browse to the image file and click Open.

 

The image column now contains data. I can show the data in a bound object control in Access where it shows an icon 'MyImage.jpg'. When I click on the icon in Access the image is opened in Paint (or whatever is associated with jpg files).

 

In PowerApps, I choose a layout for my gallery that includes an image. I 'bind' my Image column to the image control in the gallery, but the image does not populate in the gallery.

 

Hope that makes my steps clear.

 

I want other users to maintain and populate my 'MenuItems' table (the one with the images) hence I'm working on a companion Access app to allow them to do so from the desktop. Do I need to use some other method to load the image data into the table?

 

Meneghino
Level 10

Re: Azure SQL DB Data Source. Options for displaying images.

Please try to load the image from PowerApps.

You can try to use the Add image control, that worked for me.

Super User
Super User

Re: Azure SQL DB Data Source. Options for displaying images.

Thanks @Meneghino

 

I'm struggling with another issue at the moment which is more of a showstopper than the images, but I will give your suggestion a try later in the next day or two.

 

I'd like to get the images working in an image field (rather than using a path/link) as I want to load the table data (my relatively static menu list) into a local collection to improve performance. Hopefully image data can be part of a collection...

Super User
Super User

Re: Azure SQL DB Data Source. Options for displaying images.

Thanks @Meneghino

 

I added a new screen with an 'Add Picture' control and a button for loading which uses the Patch command to get the file into Azure SQL DB.

 

Patch('[Order].[ImageTest]', Defaults('[Order].[ImageTest]'),{ImageFile:    AddMediaButton1.Media , ImageName:"Test"})

When creating a gallery with an Image control and setting the control to the ImageFile column (Image data type in Azure SQL DB) the image does show correctly.

 

I used ClearCollect to cache the table with the images locally and that too seems to be working - now I just need to load 100 or so images!

 

Thanks

Paul

 

Anonymous
Not applicable

Re: Azure SQL DB Data Source. Options for displaying images.

Hi Paul: I followed your post and made it works on uploading/saving image file from EditForm to my loca SQL Express (I thought once it works, switching App to Azure SQL server should be no issue).and displayed it on DisplayForm as expected.. But after closed App and reopen it again, the image in database did not display well! Do you have same issue and how did you fix it?

 

Super User
Super User

Re: Azure SQL DB Data Source. Options for displaying images.

Hi @Anonymous 

 

PowerApps does seem to 'struggle' with image fields from SQL sometimes. The only 'solution' I have is to use a gallery to display the image and to put a refresh button on it so that if it does not load properly from the DB, the user can easily 'try again' by hitting the refresh button.

 

Hopefully one day this will be fixed along with PowerApps working properly with varBinary(Max) fields.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 55 members 4,303 guests
Please welcome our newest community members: