cancel
Showing results for 
Search instead for 
Did you mean: 

Actions on Components

It would be advantageous to have Actions on Components.  At the very least an OnSelect action.  At the best, the ability to create custom actions in your component.

A common example is the "menu" component - the ability to raise an Action when a menu item is selected to be acted upon in the App would be helpful.

 

Current workaround - use a Toggle and create formulas based on conditions around the component. Although this adds more dependency in the hosting app - which is what the component was intended to remove.

Status: Started

The behavior property which triggers when resetting the component has been worked on. And more custom ways to add behavior property has also been planned. 

Comments
Level 10

I really agree with @RandyHayes . Without trickering OnSelect and OnChange events the component is basically useless.

 

@TopShelf-MSFT , could you assist on this request and inform the right member to look into this in the PowerApps Team. Thanks.

 

Paul

PowerApps Staff yfw
PowerApps Staff
Status changed to: Started

The behavior property which triggers when resetting the component has been worked on. And more custom ways to add behavior property has also been planned. 

Level 8

I think one way to go is to check whether there are any standard events inside the components, and give the user the option to expose them, to the internal component logic can bridge to the app logic it is used in. 


Simple Example: Fancy Button

Suppose I want to combine several icons to give a button a custom shape, or to react to variables to give it different shapes and colors. 

I would start the component and use standard icons, and a standard button. Layer them properly, and use e.g. 3 variables to control the visibility of 3 icons. 
I could just have the button transparent and lay the icons below it. 
3 input variables would ccontrol the visibility of the icons. 

Proposed implementation: The component creator would understand I used one standard PowerApps button, its OnSelect Event would be in a list of Events that I could expose in the Component, in addition to the input and output variables. 

A more advanced example could be packaging a Form or Gallery inside a component, with the option to expose those objects events, such as OnSuccess, OnReset, OnFailure, etc. 

 

Level 8

I think even if the component could input and output a type "function" it could work.

Level 8

Agreed!

 

Just like we currently have the ability to add up input/output custom properties, having the ability to declare and trigger custom events that would really allow to bring the "locode/nocode" components in the Big League!

 

Level: Powered On

While I appreciate the fundamentals of the components concept, I'm finding it hard in its current reiteration to justify spending time building components that cannot accept basic coding like Navigate() in its OnSelect.

I do like that Collections are usable in the Component but it perplexes me that Variables are completely ignored.

I'm attempting to stream line application layouts and features. Having a component that I can stick the same OnSelect code into and use it on every page is extremely pivotal to my adoption to Components. Yes layout, color and dynamic headings are great but without the ability to insert code into buttons this becomes less appealing.

I’m going to continue researching Components as there may be a less obvious way to do what I’m attempting. Feel free to reach out to me if you would like to know more about what I’m attempting to do and how we benefit from further communications.