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
Resident Rockstar

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

 

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

 

Paul

Power Apps
Power Apps
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. 

Continued Contributor

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. 

 

Responsive Resident

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

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!

 

Advocate I

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.

Advocate II
Advocate II

agree. I'm glad to see that MS is currently working on it

Helper II

Has there been any updates on this functionality? I'm wanting to create custom components but end up needing to add another button on top of the component to get the OnSelect action for navigation.

Frequent Visitor

I would love to see this. Even something as simple as adding a custom action (like custom properties) and then being able to raise that action from that component's control's methods would be huge. I envision this as similar to being able to call the Select() function to fire another control's OnSelect() method, perhaps Call(CustomComponent, CustomAction);

Advocate V
Advocate V

This not an absolute NECESSITY.