Hi - having issues clearing and/or resetting a variable file link after submitting in PowerApps.
I need the link to clear after submission, so the next user doesn't have a previous file link associated with their request.
Furthermore, I have a reset function on my form submit button as well.
Any ideas what I'm missing to accomplish not having previous file link attachment show up on new requests?
Here are screenshots:
Here is code for SAVE ATTACHMENT button
Try on the end of your code snippet:
Also, Resetting a form won't clear a variable, even if it's used by that form. They are two separate entities.
I followed Shane Young video..
I don’t fully understand why LAST(attachment) or VarFileLink needed.
It’s a struggle attaching a file in PowerApp and saving it, etc.
open to other options
Firstly, Last() is used on the Attachment Control because that control can hold 1-many items meaning it's a table of records. So, when referencing a table you need to also reference the record inside that table you want. Shane uses Last() but you could also use First(), it doesn't matter.
VarFileLink, in this context, is used to open the last saved file. If you don't need this functionality then you can remove it, so instead of
Set( VarFileLink, yourFlow.Run(...).sharepointfilelink)
- you just need
I'm not sure what you mean by It’s a struggle attaching a file in PowerApp and saving it, etc. but there are many options available to upload / save files via powerapps. Shane's video explains a single file upload but via Google you'd be able to find multi file uploads and other methods that may suit your needs?
I’ll give your suggestion a try.
let’s just say my recent Google searches & attempts to find a solution have failed, lol, as I need to attach it in an approval flow that is separate from the save attachment button. Shane example actually worked for me outside of the clearing attachment.
thanks for your support.
Uploading multiple files (Shane Young again)
EDIT: I think you can only use files up to 50MB in size and it may also fail if the TOTAL upload size (eg File1 + File 2 + File3 > 50MB) is greater than 50MB - you'd just need to experiment with that
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Your chance to join an engaging competition of Power Platform enthusiasts.