cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (88,444)