cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisHarper
Helper II
Helper II

Dataverse Image URL

Is it possible to get the URL of a dataverse image into Power Apps?  Either the thumbnail or full image

 

I need to be able to add the URL to a collection and pass to an API

2 ACCEPTED SOLUTIONS

Accepted Solutions
JamesYumnam
Resolver III
Resolver III

Hi @ChrisHarper 

Yes, basically we need to construct this URL: https://orgc34d9a55.crm8.dynamics.com/Image/download.aspx?Entity=cr71c_myimageentity&Attribute=cr71c...

Please try this way and let me know if this helps you:

  • Create a table 
    JamesYumnam_0-1626621715880.png
  • Add an image column as below:
    JamesYumnam_1-1626622428954.png

    Add a new image record:

    JamesYumnam_2-1626623105682.png

     

    In the URL, there is the organisation URL, then Entity = table name, Attribute = image column name, id = the value in the MyImageEntity. So other values are static but ID is the dynamic one. To fetch the ID I have done this.
  • In power apps app, I have a label whose Text property is set as below:

 

 

Concatenate("https://orgc34d9a55.crm8.dynamics.com/Image/download.aspx?Entity=cr71c_myimageentity&Attribute=cr71c_entityimage&Id=",Gallery1.Selected.MyImageEntity)​

 

This will give the below:
JamesYumnam_3-1626626127196.png

 

Hope this helps.

View solution in original post

Hi @ChrisHarper,

 

The above will only retrieve the primary image as a thumbnail. The URL to download a specific column image would use the following patterns:

Thumbnail: https://<orgUrl>/api/data/v9.1/<entity-type(id)>/<image-attribute-name>/$value 

Full-size image: https://<orgUrl>/api/data/v9.1/<entity-type(id)>/<image-attribute-name>/$value?size=full

 

Note that if the full image size is greater than 16 MB, you will need to download the file in 4 MB chunks.

 

More information at the reference below.

Image columns (Microsoft Dataverse) - Power Apps | Microsoft Docs

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

9 REPLIES 9
JamesYumnam
Resolver III
Resolver III

Hi @ChrisHarper 

Yes, basically we need to construct this URL: https://orgc34d9a55.crm8.dynamics.com/Image/download.aspx?Entity=cr71c_myimageentity&Attribute=cr71c...

Please try this way and let me know if this helps you:

  • Create a table 
    JamesYumnam_0-1626621715880.png
  • Add an image column as below:
    JamesYumnam_1-1626622428954.png

    Add a new image record:

    JamesYumnam_2-1626623105682.png

     

    In the URL, there is the organisation URL, then Entity = table name, Attribute = image column name, id = the value in the MyImageEntity. So other values are static but ID is the dynamic one. To fetch the ID I have done this.
  • In power apps app, I have a label whose Text property is set as below:

 

 

Concatenate("https://orgc34d9a55.crm8.dynamics.com/Image/download.aspx?Entity=cr71c_myimageentity&Attribute=cr71c_entityimage&Id=",Gallery1.Selected.MyImageEntity)​

 

This will give the below:
JamesYumnam_3-1626626127196.png

 

Hope this helps.

Hi @ChrisHarper,

 

The above will only retrieve the primary image as a thumbnail. The URL to download a specific column image would use the following patterns:

Thumbnail: https://<orgUrl>/api/data/v9.1/<entity-type(id)>/<image-attribute-name>/$value 

Full-size image: https://<orgUrl>/api/data/v9.1/<entity-type(id)>/<image-attribute-name>/$value?size=full

 

Note that if the full image size is greater than 16 MB, you will need to download the file in 4 MB chunks.

 

More information at the reference below.

Image columns (Microsoft Dataverse) - Power Apps | Microsoft Docs

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

ChrisHarper
Helper II
Helper II

@JamesYumnam  & @ChrisPiasecki 

 

Many thanks for your prompt responses - got it working

Hi Chris

Is it going to work if I'm trying to download a file data type instead of image 

I have stored XLS file in a column in data verse table I want to download that on the click of the button is there a solution can some one help?

 

Hey @ChrisPiasecki - I am still having trouble with this but your solution has gotten me farther than most! I'm getting stuck on the <entity-type(id)> and <image-attribute-name> and was wondering if you could elaborate on this a little more or provide an example? Thanks!

ChrisHarper
Helper II
Helper II

Hi dnkt,

 

I used the following URL format to retrieve the image:

 

https://<orgUrl>/api/data/v9.1/entity=<table>&attribute=<column>&id=<GUID> 

 

Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

BrucePain
Frequent Visitor

@ChrisPiasecki @JamesYumnam Hi, I am using PowerApps to upload attachments/file to Dataverse table, I would want the users to have the ability to launch or open the attachment/file in the browser. How can this be achieved? 

CamFi
Frequent Visitor

Hi @BrucePain,

im trying to do something similar. did you manage to find a solution for this? 

 

thank you. 

brink23
Frequent Visitor

Hi all,

I was able to create the Url for retrieving the full image.

After putting similar Url's in a PDF file for use by other users, the Url's are working fine for myself, however other users within the company seem to be lacking user rights.

The user are able to use the applicable user expenses App, but not the created links

Regards Henk van den Brink

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,203)