cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wiese
Helper I
Helper I

Display one image from OneDrive

I have seen similar posts and some say it can be done while others say it cannot.  The ones that say it can, do not include complete information.  I do not want to use an excel spreadsheet.  I have a JPG file stored on onedrive that occasionally changes.  I want my app to display this image.  I can use FLOW to do Get File Content, but I cannot get it to display.  I have seen a post where someone did something similar getting files from HTTP and they said that works, but I cannot seem to find the right combination steps to make it work for me.  I am not very good with FLOW, so that may be part of the issue.  Can anyone offer an assistance?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Wiese 

 

To get the image from OneDrive in your canvas app, you can return the file content from the OneDrive action as a response using the "Respond to PowerApps" action. You need to update the formula to convert the file content as datauri using the expression:

dataUri(body('Get_file_content_using_path'))

ww1.png
As part of Canvas App configuration, you can add the flow on the screen "OnVisible" property to trigger this flow when the screen is visible as:

Screen -> OnVisible -> Set(Response,FlowName.Run())

Image Control -> Image -> Response.response

here, Response is the name of variable defined in canvas app and response is the name of output sent via flow.

ww2.png

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3

Hi @Wiese 

 

To get the image from OneDrive in your canvas app, you can return the file content from the OneDrive action as a response using the "Respond to PowerApps" action. You need to update the formula to convert the file content as datauri using the expression:

dataUri(body('Get_file_content_using_path'))

ww1.png
As part of Canvas App configuration, you can add the flow on the screen "OnVisible" property to trigger this flow when the screen is visible as:

Screen -> OnVisible -> Set(Response,FlowName.Run())

Image Control -> Image -> Response.response

here, Response is the name of variable defined in canvas app and response is the name of output sent via flow.

ww2.png

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@yashag2255 ,

Thanks so much for your reply.  Your post above got me a little closer, I think, but it still is not working for me.  Can you look at the below and let me know where I am going wrong?

Attached is my flow:

 
 

1.png

Then in my canvas app, I am testing it with a button, so my OnSelect of the button is this:

Set(FlowRetrieveImage,RetrieveImageFromOneDrive.Run())

And the Image property of the image on my screen is set to:

FlowRetrieveImage.response

 

The flow runs and says it is successful, but nothing is displayed for the image.  Can you help me figure out where I am going wrong?

 

Thanks so much for your reply as I have been trying to get this to work for several days.

 

Never mind to my response above.  As soon as I posted it I realized what I had done.  I did not put the flow code to convert it in as an expression, I just pasted it into the box.  Thanks again for your help!  This really helped me a lot!

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,134)