cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
NickIng
Level: Powered On

Get a Check Box to update Excel file (source from Gallery selection)

 

Hello

 

Relatively new to PowerApps so appreciate any help.

 

I'm trying to use a Check Box to update a person's record in Excel. I have a Screen where attendees select their name, and then a second page where the sign a declaration and then tick a box to say they have attended.

 

I have seen other posts suggesting Patch, which I cannot get to work even slightly.  

 

The below seems like it might work but I get the error "__PowerappsID__ Field required"

 

ONCHECK

Update(Table2_1, First(Filter(Table2_1, 'Signed In' = TemplateGalleryList1.Selected.'Signed In')), {Signed_x0020_In:"True"} )

 

"Signed In" is the column in excel I am trying to update with any form of text (hopefully "Yes" or "True").

 

Any thoughts would be very welcome.

Thanks

Nick

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Get a Check Box to update Excel file (source from Gallery selection)

Hi @NickIng ,

I suggest you not use Update or UpDateIf function.

These two functions are used to replace a record. It will not reserve the original data.

The reason why you met this error message is because that __PowerappsID__ Field is a required field and the formula that you use not assign value to this field.

 I suggest you use Patch function.This function is used to modify partial fields and will reserve the original data of those fields that you do not want to modify.

Try this formula:

Patch(Table2_1, First(Filter(Table2_1, 'Signed In' = TemplateGalleryList1.Selected.'Signed In')), {Signed_x0020_In:"True"} )

 

Here's a doc about update and patch for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-update-updateif

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
shailendra74
Level 8

Re: Get a Check Box to update Excel file (source from Gallery selection)

Hi @NickIng 

 

Download the excel and remove the __PowerappsID__ column which is generated by PowerApps. Upload the excel and attach to your app again.

 

Also I hope there is a primary key field in the excel which would represent a row. Write the below code onSelect of a button (or so)

 

UpdateIf(Table2_1, ID = gallery.Selected.ID, {Signed_x0020_In:"True"})

Hope this helps.

 

Thanks. 

 

 

Community Support Team
Community Support Team

Re: Get a Check Box to update Excel file (source from Gallery selection)

Hi @NickIng ,

I suggest you not use Update or UpDateIf function.

These two functions are used to replace a record. It will not reserve the original data.

The reason why you met this error message is because that __PowerappsID__ Field is a required field and the formula that you use not assign value to this field.

 I suggest you use Patch function.This function is used to modify partial fields and will reserve the original data of those fields that you do not want to modify.

Try this formula:

Patch(Table2_1, First(Filter(Table2_1, 'Signed In' = TemplateGalleryList1.Selected.'Signed In')), {Signed_x0020_In:"True"} )

 

Here's a doc about update and patch for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-update-updateif

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 147 members 3,990 guests
Please welcome our newest community members: