Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Uploading file to Sharepoint List with Gallery/Variable

Hi everyone,


currently I try to upload files to a sharepoint online list (SList1) with the powerapps attachment control.

However it seems there is an issue and I need some support to resolve the issue.


I have a gallery (Gallery1) on screen1. The database for the gallery is SList1. If I select an item in the gallery I come to a new screen (screen 2).

On screen 2 I can edit all data (without form) from the SList and even upload attachments using the attachment control.

So I created several text fields to edit the data.
However, the attachment control is only working if I am using this statement in the "Items" field:




Nevertheless, the Sharepoint list can change due to modifications on the list. itself Means, "Gallery1.Selected" can change based on the modifications in Sharepoint. To avoid that, I create a variable with "OnSelect" in Gallery1.




I am using this variable for each default value in the textfields in screen 2.
For instance the Default Value in Textfield 1: varSelectedItem.'List Item Title'
In Textfield 1 the Title for the Sharepoint List Item will be displayed.
This is working flawlessly for every Textfield.

However if I am using this variable for the attachment control I am getting an error.




The errors is "Name is not valid.  This identifier is not recognized."

Any idea how to get the attachments with the variable and display them in the attachment control or maybe in a gallery?

Super User
Super User

@PapermanZ ,

You cannot view or refer to attachments in a Variable or a Collection - you must refer directly to the list (as you have discovered).


Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Regular Visitor

But this is what I am doing. I am saving my reference in a variable. So the reference is pointing directly to the list Item. Normally the attachment control needs to behave like any other fields.

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,789)