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 / updating a number fiel...
Power Apps
Answered

updating a number field from Gallary to Sharepoint list

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I have a sharepoint list called timesheet with different field types including text, date and number. I have also created a gallery to display the same information. I have built an configured in power apps, when a user makes a changes in a galarry, using the onchange function, to update the sharepoint list. i got it working for the text and date field but not number field. see below code:

Patch(timesheet, {ID: Gallery1.Selected.ID}, {'Purchase Order Number':ponumberfield.Text}) working

Patch(timesheet, {ID: Gallery1.Selected.ID}, {Date:Datefield.SelectedDate}) working

Patch(timesheet, {ID: Gallery1.Selected.ID}, {Hours:hoursfield.number}) not working.

 

In Sharepoint, the field type is number  in power apps the text field type is also number. i think the problem is i don't have the right syntax where i use number. can someone help?

 

 

Categories:
  • Verified answer
    AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @Bream, I am not sure what is the hoursfield.number?

    Try this:

    Patch(timesheet, {ID: Gallery1.Selected.ID}, {Hours: Value(hoursfield.Text)})
    If my reply helped you, please give a  👍 , & if it solved your issue, please give a 👍 & Accept it as the Solution to help other community members find it more.

    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.

    Visit my Blog: www.powerplatformplace.com

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard