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

Patching Excel from checkbox

Hi there,

 

I'm relatively new to Powerapps and I'm looking for your help:

 

I have a variety of checkboxes which I need to be patched to an excel spreadsheet. Once I click a submit button this patches all of the values which is inputted (like a form) and puts it onto the sheet.  I have done this successfully, but I need the results from the checkboxes to be "Yes" and blank, rather than TRUE and FALSE.

 

I've tried using a patch/if function in the OnCheck and OnUncheck fields of my checkboxes, but this creates a new separate row on my excel sheet.

 

Here's what it currently looks like below, the red text show my checkboxes:

 

Patch(RestraintTable, Defaults(RestraintTable),
{Location: LocationDropdown.Selected.Value,
AddressOfCheckpoint: ExactAddress.Text,
Recorder: ScribeName.Text,
Date: CheckpointDate.SelectedDate,
CheckpointType: CheckpointTypeDropdown.Selected.Value,
RestraintType: RestraintTypeDropDown.Selected.Value,
RestraintExpiry: RestraintExpiryDropDown.Selected.Value,
RestraintBrand: RestraintBrandDropDown.Selected.Value,
AgeofChild: ChildAgeDropDown.Selected.Value,
NoFault: NoFault.Value,

SeatOutOfDate: SeatoutofDate.Value,

SeatTypeUnsuitable: SeatTypeUnsuitable.Value,

IncorrectPosition: IncorrectPositionInCar.Value,

TetherStrapNotAttached: TetherStrapNotAttached.Value,

LockingClipRequired: LockingClipRequired.Value,

NoActionRequired: NoActionNeeded.Value,

AnchorBoltInstalled: AnchorBoltInstalled.Value})

 

Is it possible to put multiple if functions into this patch?

 

Many thanks.

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Patching Excel from checkbox

Hi @jonilee,

Try If(nofault.Value  ,”yes”,Blank()), 

Community Support Team
Community Support Team

Re: Patching Excel from checkbox

Hi @jonilee,

 

The formula should be:

Patch(RestraintTable, Defaults(RestraintTable),
{Location: LocationDropdown.Selected.Value,
AddressOfCheckpoint: ExactAddress.Text,
Recorder: ScribeName.Text,
Date: CheckpointDate.SelectedDate,
CheckpointType: CheckpointTypeDropdown.Selected.Value,
RestraintType: RestraintTypeDropDown.Selected.Value,
RestraintExpiry: RestraintExpiryDropDown.Selected.Value,
RestraintBrand: RestraintBrandDropDown.Selected.Value,
AgeofChild: ChildAgeDropDown.Selected.Value,
NoFault: If(NoFault.Value=true,"Yes",Blank(),
.
.
.
.
.
.})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Patching Excel from checkbox

Hi @jonilee,

Try If(nofault.Value  ,”yes”,Blank()), 

Community Support Team
Community Support Team

Re: Patching Excel from checkbox

Hi @jonilee,

 

The formula should be:

Patch(RestraintTable, Defaults(RestraintTable),
{Location: LocationDropdown.Selected.Value,
AddressOfCheckpoint: ExactAddress.Text,
Recorder: ScribeName.Text,
Date: CheckpointDate.SelectedDate,
CheckpointType: CheckpointTypeDropdown.Selected.Value,
RestraintType: RestraintTypeDropDown.Selected.Value,
RestraintExpiry: RestraintExpiryDropDown.Selected.Value,
RestraintBrand: RestraintBrandDropDown.Selected.Value,
AgeofChild: ChildAgeDropDown.Selected.Value,
NoFault: If(NoFault.Value=true,"Yes",Blank(),
.
.
.
.
.
.})

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
jonilee
Level: Powered On

Re: Patching Excel from checkbox

Thanks @Drrickryp and  @v-monli-msft 

 

This worked !

 

Many thanks,

Joni

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Tomorrow, September 18th at 8am PDT

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 109 members 3,785 guests
Please welcome our newest community members: