I have looked everywhere to try and resolve this but cannot work it out. I have a Flow set up where it copies an attachment from a SharePoint List to a SharePoint Document Library. Once it is in a Library, I am trying to make another flow using the PowerApps v2 trigger that reacts when a button is pressed. The button is linked to a PowerApps Gallery that lists people's names and an .docx attachment. I would like to move the file of the selected person from one folder in the SharePoint document library to another. I first tried 'Get Files' and 'Get File Properties' instead of using the PowerApps trigger, but it moves all the files in the folder, not just the one that is linked to that person. I've since found a different way to do this using the PowerApps trigger, and to a certain extent got it working.
I have used this code in OnSelect in PowerApps:
MovetoRejected.Run(
{
File: {
contentBytes: First(DataCardValue22_1.Attachments).Value,
name: First(DataCardValue22_1.Attachments).Name
}
}
); SubmitForm(FormDecision); Patch('Completion List', LookUp('Completion List', 'Submission ID'=Text(DataCardValue42.Text)), {Status:{Value:"Rejected"}}); Navigate(BrowseScreen1);
My question is, how do I get the filename to pull through to the flow from PowerApps? If input the actual filename myself in the 'File Name' field in the flow it works perfectly. If I try and call the File Name from PowerApps it fails.