cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
agent3154
Level: Powered On

Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

According to the Attachement control documentation, there is OnSelect property for attachment control.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-attachments

OnAttach – How the app responds when the user adds a new file attachment.

OnRemove – How the app responds when the user deletes an existing attachment.

OnSelect – How the app responds when the user clicks on an attachment.

 

However, 

When I test it in the powerapp, OnSelect is missing and OnAttach/Onremove properties have been renamed to OnAddFile/OnRemoveFile. Not sure when it updated.

 

Is there any way to add action when I click on an attachment since OnSelect was removed at some point( or could it be a bug?) ?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

@agent3154 

Since there is dissimilar display of the control in different environments, would it be adventageous to instead implement a Gallery with the attachments in them, then the user can click on that item and you could either kick a Launch or set it to just download?

Just a thought...

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

11 REPLIES 11
Microsoft RusselThomas
Microsoft

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

Hi agent3154,

 

If you're looking for an action seperate to what the control provides, and OnAddFile/OnRemoveFile is not it, you can place an invisible overlay over the click area and use that objects OnSelect property.

 

Just insert a rectangle icon, make it transparent and place it over the click-area - you can then use the rectangle 'OnSelect' property.  

 

Please bear in mind, this answer is without regard to the control documentation, the control itself or the possibility of any bugs and the 'overlay' will by default supercede any 'on-click' actions the underlying control may or may not provide if you place the rectangle directly over the control's clickable area.

 

Hope this helps,

 

RT

Community Support Team
Community Support Team

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

Hi @agent3154 ,

The OnSelect property of the Attachments control has been removed within PowerApps recently. I could not also find any online doc mentioned about this updates in Attachments control.

 

Currently, within PowerApps, if you click an attachment file within the Attachments control, it would download this attachment file into your local default download folder.

If you want to perform other operations when you click on an attachment within the Attachments control, I afraid that there is no way to achieve your needs in PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
agent3154
Level: Powered On

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

@RusselThomas Thanks for your input.

To clarify, the app will be put on Teams Tab (Teams client for mac ), and downloading attachement does not show anything so far. (will still download the files to the download folder, but I want the user to be notified that files have been download) 

 

Putting an invisible layer on top of the attachments field will not start the download (lmk if I am missing anything here), which is what I wanted. 

Was wondering if there's any workround for that or there has to an Onselect property in order for that to work. 

 

agent3154
Level: Powered On

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

why removing something that would help without any explanations for it...Smiley Frustrated

Anyway thanks for your help!

Microsoft RusselThomas
Microsoft

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

Hmmm - I'll fiddle a bit to confirm, but last I checked the attachment control only works inside forms...

The default behaviour inside an Edit form is to upload a file when selected, while the default behaviour in a View form is to download the file when selected.

 

So what is it you're wanting it to do when you click it?

 

Kind regards,


RT

Super User
Super User

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

@RusselThomas 

Actually, you can use the Attachment control independent of a Form.  

We use it often for when we want to provide upload from local files.

 

Just an FYI since I saw you mention it.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
agent3154
Level: Powered On

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

I have both forms - view and edit form

The behaviour of attachement field within BOTH forms right now:

When I click on the attachement, it will download the file. However, the behaviour is different in different browser.

(under mac enviroment)

Within Chrome: the downloaded file will show in the buttom, where you can click it to open.

Within firfox: the downloaded file will show in the buttom, but it'll also ask you whether you want to open it directly or not.

Within Teams Channel tab: Nothing happens, the files will be downloaded, but with no indication that files were downloaded. (unlike chrome/firefox. Also the downloaded files will have random string appended ) 


Since a lot of user will be using the app on Teams, I thought it'll make more sense to at least have a notification popup window within the app so the user knows the files have been downloaded to their download folder.

Highlighted
Super User
Super User

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

@agent3154 

Since there is dissimilar display of the control in different environments, would it be adventageous to instead implement a Gallery with the attachments in them, then the user can click on that item and you could either kick a Launch or set it to just download?

Just a thought...

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Microsoft RusselThomas
Microsoft

Re: Powerapp SharePoint List Attachment & Attachment control OnSelect property missing

Thanks @RandyHayes , sounds like a much better plan - busy playing with the controls now 🙂

 

The Teams experience is definitely finicky though - getting weird authorization HTML downloads for non-image files from list attachments - although images seem to download fine - and Teams has crashed twice in the last five minutes while testing.


Will continue playing, but the gallery sounds like the way to go

 

Kind regards,


RT

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,986)