Hello everyone and welcome to my blog. In today’s blog I will show how you can use a attachment control outside of a form control in a Power Apps canvas apps.
In Canvas apps, it is not possible to insert an attachment control on screen from the Controls toolbox. The attachment control is only available if you are using a form control for a datasource like DataVerse or SharePoint.
I will use DataVerse for this blog but you can use the same tweaks for SharePoint datasource.
Let’s say I want to insert an attachment control on screen. To do that, you need to first use a form control, add a column of type file on the form to ensure that the attachment control is inserted on the form and then copy the attachment control from there.
I have created a file column named – Contract Document in the account table of DataVerse. To add the attachment control in my app, I inserted an Edit form and then added the Contract Document field on the from.
The attachment control will be visible on the form now. Remember that I have done all these steps only to add the attachment control to my app. Once I copy the attachment control on to a new screen, you can delete the placeholder form.
The next step is to copy the attachment control. But before we do that, we need to unlock the attachment control. To do this, select the attachment control and then Unlock it from the Advanced tab of properties pane.
Now that it is unlocked, it can be copied over to any screen. Copy and paste the control to a different screen. Once you do that, you may see few errors.
Clear the formula for all errors until red cross on the control go away. That’s it. You now have the attachment control which you can use on all screens outside of any form control.
To do this with SharePoint datasource, you can use a Edit form for SharePoint list item and then copy the attachment control following the steps mentioned in this blog.
Hope this helped. You will also like the below posts.
Debajit Dutta
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.