cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kmayes
Post Prodigy
Post Prodigy

Patch Checkbox value

I've built a new SP list and I'm customising the form using PA. The reason I'm doing this is the list that is built is purely being maintained by automation. However that said the only manual manipulation that is required is selecting the months. On selection of each checkbox I want the number "1" passed back to the relevant column in SP.

 

I used Patch('SP List',Defaults('SPList,),{AprYR1:"1"}) on 'On check' however this creates a new item rather than patching the record selected through the SP list?

Then on the flip side if someone is to uncheck the checkbox I want the value to be removed if there was one.

 

Is anyone able to offer any assistance on how to fix this issue?

 

Kmayes_1-1602167493895.png

 

13 REPLIES 13

@Kmayes 

What is the error?

Where are you putting this formula (control and action)?

What is the name of your SharePoint list?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

@RandyHayes 

 

Its saying its an invalid argument,

Im putting the formula in the 'on check'

The list name is cost profile

@Kmayes 

So there is the issue...

UpdateIf (and Patch as well) all need the first parameter to be the name of your datasource.  'SP List' was what you specified in your first post message.  So that is what I used.

You need to replace 'SP List' in the formula to the name of your datasource.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

@RandyHayes 

 

How embarrassing I didnt notice that, thanks @RandyHayes 

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

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

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (26,964)