Upload Multiple Files in Dataverse : Implementation

preview_player
Показать описание
This video shows how to Implement :
1. Attach Multiple Files in a Canvas App using Data Verse
2. View all the attached files
3. Download all the existing attachments
4. Delete all the existing attachments

For demo, click the below link :

Code Snippet related to attachment control
/* Add multiple attachments in an attachment control (here reference table that is linked to other table via ProjectId (PID)) */

ForAll(attachCreateDocs.Attachments,
Patch(ProjectSupportingDocuments,
Defaults(ProjectSupportingDocuments),
{
ProId:varResult.PID,
Name:ThisRecord.Name,

SupportingDocument:
{
FileName: ThisRecord.Name,
Value:ThisRecord.Value
}
}
)
)


--------------------------------------------------------------------------------------
/* Add new multiple attachments in an attachment control */
ForAll(attachAddDocs.Attachments,
Patch(ProjectSupportingDocuments,
Defaults(ProjectSupportingDocuments),
{
ProId:PIDValue.Text,
Name:ThisRecord.Name,

SupportingDocument:
{
FileName: ThisRecord.Name,
Value:ThisRecord.Value
}
}
)
)

---------------------------------------------------------------------------------------
/* Show all the attachments in an attachment control */
ForAll(
Filter(
ProjectSupportingDocuments,
ProId = EmpGallery.Selected.PID
).SupportingDocument,
{
DisplayName: ThisRecord.SupportingDocument.FileName,
Value: ThisRecord.SupportingDocument.Value
}
)
---------------------------------------------------------------------------------
/* Delete any attachment shown in a gallery control */
Remove(ProjectSupportingDocuments,ThisItem)
Рекомендации по теме
Комментарии
Автор

Hello Abhinav,
First of all, thank you very much for your video.
I have a problem, maybe you can give me a solution.

The upload works fine from my desktop. However, when I do this upload via my cell phone, the data record is created in the table with the complete label but no file is included.
Is there a solution for this?

Many greetings Uwe

lucy
Автор

Fabulous & very clear demonstration. Thank you for making this one. I have two questions, If you can help please. First, Those downloaded files has some issue "Files not available onsite". how to get rid of that ? second, By any chance can we display files horizontally instead of vertical ?

techwithchanchal
Автор

Hi Uwe,

Thx for subscribing me
As far as my understanding I suppose the extension of the file is not supporting when it is being retrieved from back end and displaying via your cell phone

You need to configure the settings and enable the permission in your cell phone to allow all extensions for file properties

Can u give it a try with any other cell phone and just troubleshoot that same issue is happening with other cell phones

Regards
Abhinav

LearnPowerPlatformWithAbhinav