07-27-2022 05:00 AM - last edited 11-14-2023 08:57 AM
Used to upload documents to a library when connected to a Power Automate flow.
Add the component to your component library. In your app, get the UploadFiles component from the Components library and add it to your screen. The component has the following custom properties (see image)
//Hide attachment dialog UpdateContext({locShowAttachmentDialog: !locShowAttachmentDialog})
UpdateContext({locShowAttachmentDialog: false})
ForAll( UploadFiles_1.Attachments, //Component output property containing file names and binary values Collect( colAttachControl, //Collection containing files returned from the component { //Call to Power Automate flow fileInfo: YourFlowNameHere.Run( Name, //File name //File properties { name: Name, contentBytes: Value }, //Item id from related list gallery (optional) galContracts.Selected.ID ) } ) ); //Hide attachment dialog UpdateContext({locShowAttachmentDialog: false})