cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Panggabean14
Helper I
Helper I

Update single field in SharePoint List from PowerApps

Hello everyone,

I have a problem updating/patching a single field in my SharePoint List from the app I build in PowerApps.

I have a List that contain the Employee leave request quota and each time user request a leave, their quota should be reduced according to the number of days taken off. Each quota of each employee is listed in the List, so I do the calculation inside the PowerApps then Patch it to the List. 

But nothing happened, the quota still remain the same, not reduced at all. 

Patch('Data Pegawai',First(Filter('Data Pegawai',NamaPegawai = GalleryManagerApprover_2.Selected.Nama)),{KuotaCuti : totalCuti_5})

"KuotaCuti" is the field from the List that contain the quota, and "totalCuti_5" is the label in PowerApps that contain the calculation result of quota - days off


Is there something wrong from my formula ? Please help.

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

If number, reivise it to:

Patch('Data Pegawai',First(Filter('Data Pegawai',NamaPegawai = GalleryManagerApprover_2.Selected.Nama)),{KuotaCuti : Value(totalCuti_5.Text)})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

4 REPLIES 4
eka24
Super User III
Super User III

Revise the formula to:

Patch('Data Pegawai',First(Filter('Data Pegawai',NamaPegawai = GalleryManagerApprover_2.Selected.Nama)),{KuotaCuti : totalCuti_5.Text})

If totalCuti_5.Text is a textbox or label

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 Hei, thanks for the reply

I already do what you said there, but KuotaCuti field type is number, when I put .text on totalCuti_5 it will show an error.
Even I test with directly put random number then patch the field, KuotaCuti : 100 , nothing changed.

eka24
Super User III
Super User III

If number, reivise it to:

Patch('Data Pegawai',First(Filter('Data Pegawai',NamaPegawai = GalleryManagerApprover_2.Selected.Nama)),{KuotaCuti : Value(totalCuti_5.Text)})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

@eka24 wow, it worked. Thank you so much 😄

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (58,047)