filmov
tv
Upload Multiple Files in Dataverse : Implementation
![preview_player](https://i.ytimg.com/vi/JAO562Y234o/maxresdefault.jpg)
Показать описание
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)
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)
Комментарии