Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Up Program - Build A Canvas App
Answered

Select(AddMediaButton) does not trigger the AddMediaButton when used on a custom icon/button

(0) ShareShare
ReportReport
Posted on by 2
Hi community,

I’m building a Canvas app where I want to use a custom icon (or button) as a trigger for photo upload, instead of displaying the default AddMediaButton (Add picture control).

I added the standard AddMediaButton2 (it works fine when clicked directly).

But when I try to use Select(AddMediaButton2) in the OnSelect property of my own icon or button, nothing happens—the photo picker dialog does not open.

I have already checked that AddMediaButton2 is visible on the screen and not overlapped.

Is there any workaround, limitation, or best practice to trigger the AddMediaButton programmatically from another control?

I would like to keep my UI clean and only show a custom icon, but preserve the standard functionality (choose from gallery or use camera).

Any tips or official info? Thank you!
Categories:
  • Verified answer
    Zdenka_Cech Profile Picture
    82 on at
    Select(AddMediaButton) does not trigger the AddMediaButton when used on a custom icon/button
    Hi 
    What you can do is add your button/image backward (below) the 'Add Image' control layer.
    Make the add image control transparent color in background and text.
    Move your UploadedImage if needed somewhere else or you can set its visibility to false. 
    Works fine for me on current screen.
     
    Select() function works on current screen, but in this case the control is 'special' and maybe does not receive the Select() action.
    If you are calling cross screens it does not work even my suggested solution will not work cross screens.
    I can imagine to set the image to a variable if you need to travel to another screen.
     
    *Z
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Leaderboard >

Featured topics