
Hello Power Apps Community,
My first post, so sorry in advance if this post doesn't follow the procedure.
I'm currently trying to create an edit button in component libraries. I don't want to hard code this to one gallery but want to have the ability to manipulate the code so I can use the component on different screens and change the edit button so it edits the gallery on that particular screen. Is this possible?
Thank you so much in advance.
You should be able to achieve this using one or more Input and Output properties of a Component.
Check for more detail here:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-component#custom-properties
A component can receive input values and emit data if you create one or more custom properties. These scenarios are advanced and require you to understand formulas and binding contracts.
Input property is how a component receives data to be used in the component. Input properties appear in the Properties tab of the right-hand pane if an instance of the component is selected. You can configure input properties with expressions or formulas, just as you configure standard properties in other controls. Other controls have input properties, such as the Default property of a Text input control.
Output property is used to emit data or component state. For example, the Selected property on a Gallery control is an output property. When you create an output property, you can determine what other controls can refer to the component state.