Adding an Input Porperty

Input properties are the backbone of truly reusable Power Apps components, giving you a clean way to pass data, configuration values, and behavior into your component without hard-coding anything. Whether you’re building a simple visual element or a fully interactive control, input properties let you shape how your component behaves in different contexts while keeping the internal logic neatly encapsulated.

 

* This article continues and extends the 'Creating a Component' article

Select the component screen

In the properties area, click New Custom Property

Style the property like this

 

Note that above we've checked 'Raise OnReset when value changes'. 

Now, set the form OnReset like this

Set(RunningTotal, RunningTotalComponent.InputNumber); Reset(txtNumberToAdd);

Our form already has a Global Variable called RunningTotal, this will set it equal to the Input property

Also we clear txtNumberToAdd

Back in our calling Screen, add a TextInput so that the form looks like this

Set the properties like this. Note that I've renamed the Test Input

Change the form OnVisible to this

Reset(txtInput); Reset(RunningTotalComponent_1)

Test the form

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences