web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding the value from ...
Power Apps
Answered

Adding the value from a TextInput to a column in SharePoint

(0) ShareShare
ReportReport
Posted on by 229

Hi, I'm trying to do a simple exercise with PowerApps and I'm blocked. Would be great if someone can give some hints. 

 

I've a TextInput box where I type in a number (Updated TextInput1.Format = Number).

Then I'have a button where I add the number to a column [MyNumber] in SharePoint List [MySPList]

 

I've tried to use PATCH directly but it failed

 

Patch(MySPList,Defaults(MySPList),MyNumber:TextInput1})

 

 

I understand I need to do a previous step storing the value from the TextInput1 in a Var and then do the Patch but it doesn't work either. In this case the problem is the var is stored as a "control" type instead of a number.

 

UpdateContext({TextInputVar:TextInput1);
Patch(MySPList,Defaults(MySPList),MyNumber:TextInputVar);

 

 

If I change TextInput1.Format = Text then it stores the number but as a "text" type and therefore the Patch doesn't work. 

Image below with an example of the two types I get.

 

Capture.JPG

 

 

 

 

 

 

Any idea on how can I solve this Issue? I believe it should be something really simple but It seems I go round in circles... 

Many thanks

 

 

Categories:
  • Verified answer
    wyotim Profile Picture
    2,545 on at

    Hey @Sam4 try this:

    Patch(
     MySPList,
     Defaults(MySPList),
     {MyNumber: Value(TextInput1.Text)}
    )


    PowerApps can get a bit persnickety about text and, even though the text input can only take numbers, it will treat it as a text input if you don't wrap it in a Value function, which makes sure it is a number.  

     

    Let me know if that works for you! If not, let me know and I'll happily follow up!

  • Sam4 Profile Picture
    229 on at

    Awesome :). That works!

     

    Many thanks

  • wyotim Profile Picture
    2,545 on at

    Happy to be able to help! Feel free to @ me if I can assist with anything in the future! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard