Implementing increment component

This sample component shows how to bind data with Power Apps component framework and error handling. This component renders as a textbox with an Increment button in the runtime. The text box shows the current value and the Increment button is clickable. Whenever you click on the button, the value within the textbox is increased by 1. The increment value can be changed to any number you wish.

To implement this component, the first thing you need to define the Manifest file, and then implement the custom logic in TypeScript.

Increment component.

Available for

Model-driven and canvas apps

Code

You can download the complete sample component from here.

When you click on the button, the value in the text box is increased by 1. The updated value will flow to Power Apps component framework through notifyOutputChanged method.

Note

You can change the increment value when you are configuring the component to the field on the form.

Edit the value in the text box, and if it is a valid integer, then it updates the value to Power Apps component framework. You can continuously click the Increment button and update it. If it's an invalid integer, an error message pops out.

Download sample components
How to use the sample components
Power Apps component framework API reference
Power Apps component framework manifest schema reference