cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
whitelc
Advocate II
Advocate II

Ability to create Buttons in Component Library to have OnSelect behavior as a custom property that's not just for navigation

I'm creating a Power App Component Library for our company-branded look and feel. The buttons that we use are somewhat complicated in terms of formatting (radius, basic color, text, hover color, disabled color, etc.). I was hoping that I could create a Component Button that would contain all the formatting plus Input properties for button text AND behavior for OnSelect.

 

All I seem able to do is use Navigate > Screen or Back() function. Most of the buttons I use in Apps are not for navigation, but instead are for actions like submitting a form, patching a SharePoint list item, and sending an email.

 

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

Hi there

the custom properties can be used if you wish to go this way. here is an example for a component that sends email

the button has three properties, send to, subject header and the email body.

rubin_boer_0-1600631218623.png

the onselect event for the button in the component

rubin_boer_2-1600631617103.png

On the screen the properties can be referenced like with any control

rubin_boer_1-1600631489360.png

I would have gone with a theme screen and store all my buttons within the theme etc like this. not the most elegant but it works.

rubin_boer_0-1600632197227.png

 

hope it can be useful for you.

 

 

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

Hi there

the custom properties can be used if you wish to go this way. here is an example for a component that sends email

the button has three properties, send to, subject header and the email body.

rubin_boer_0-1600631218623.png

the onselect event for the button in the component

rubin_boer_2-1600631617103.png

On the screen the properties can be referenced like with any control

rubin_boer_1-1600631489360.png

I would have gone with a theme screen and store all my buttons within the theme etc like this. not the most elegant but it works.

rubin_boer_0-1600632197227.png

 

hope it can be useful for you.

 

 

 

View solution in original post

Thanks! I will try this.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,088)