cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sayyed007amir
Resolver II
Resolver II

How to upload file in CDS using Powerapps

Any one have idea how to upload file in Common Data Service using Canvas PowerApps.
I got success with uploading images and signatures.img.png
Tried many blogs and articles but no success.
Note: I am not talking about attachment. My focus is on File Data Type in CDS.

Screenshot attached.

 
1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @sayyed007amir ,

Do you want to upload normal files (e.g. Excel, Word, PDF, ...etc) into the File type field in your Entity?

 

Actually, when you enable the File type field in your Edit form, the File Type field would generate a Attachments control to pick up files automatically.

4.JPG

then you could uploaded files to this File Type field through the generated Attachments control.

Currently, there is an known limits with the File Type field in CDS Entity, it could only store single one File for each record. Please check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/public-preview-of-file-attribute-in-power-apps/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xida-msft
Community Support
Community Support

Hi @sayyed007amir ,

Do you want to upload normal files (e.g. Excel, Word, PDF, ...etc) into the File type field in your Entity?

 

Actually, when you enable the File type field in your Edit form, the File Type field would generate a Attachments control to pick up files automatically.

4.JPG

then you could uploaded files to this File Type field through the generated Attachments control.

Currently, there is an known limits with the File Type field in CDS Entity, it could only store single one File for each record. Please check the following blog for more details:

https://powerapps.microsoft.com/en-us/blog/public-preview-of-file-attribute-in-power-apps/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, That's fine but can we upload using patch function.
Actually i was looking to upload file using custom form. 

Hi @sayyed007amir ,

Yes, you can. Please check the following screenshot:

5.JPG

Patch(
      'Your CDS Entity', 
      BrowseGallery1.Selected, 
      {
          UploadedFile: {
                           FileName: First(DataCardValue9.Attachments).Name, 
                           Value: First(DataCardValue9.Attachments).Value
                        }
      }
)

Note: The DataCardValue9 represents the Attachments control in your Edit form

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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 (4,504)