Search code examples
powerappspowerapps-formula

Increase input field by clicking button in PowerApps


I have text input from SharePoint list,

what I want to do is when the user Click on the + icon increase the text field by 1

enter image description here

this code is OnSelect for the plus Icon

Value(DataCardValue53.Text)+1

Solution

  • Follow this:

    1. Write below formula in OnVisible property of Screen control:
    UpdateContext({txtInputVal: 0});
    
    1. Set OnSelect property of button control to:
    UpdateContext({txtInputVal: Value(DataCardValue53.Text) + 1})
    

    OR

    UpdateContext({txtInputVal: txtInputVal + 1})
    
    1. Set Default property of text box (DataCardValue53) control to:
    txtInputVal
    

    Documentation: Understand variables in canvas apps