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

Use Lookup to default checkbox and check/uncheck

I have an app that directly patches a radio values to the datasource and uses a lookup for defaulting the radio buttons. How can I convert these so that this format works with a checkbox. I don't know how to alter the onchange for oncheck and onuncheck for the checkbox. How can I alter the onchange for the uncheck part of the checkbox?

Onstart - ForAll(GUAT, Collect(collGUATMasterData, {C1: Step, C2:'Short Description', C3:LookUp(collGUATResponses, Title=vUserMail &&(GUATListID)=Text(Step) && (Scenario)=Text(Scenario) && (Step)=Text(Stepp) && (Name_)=Text(varUser), RadioValue), C4:System, C5:Scenario, C6:Stepp, C7:Name_=User().FullName}));

 

Default of radio button - LookUp(GUATResponses, Title=vUserMail && GUATListID = Text(ThisItem.C1)).RadioValue 

 

Onchange of radio button - Patch(GUATResponses,
Coalesce(LookUp(GUATResponses, Title=vUserMail && GUATListID=Text(ThisItem.C1) && Scenario=Text(ThisItem.C5) && Step=Text(ThisItem.C6) && Name_=varUser),
Defaults(GUATResponses)
),
{Title: vUserMail, GUATListID: ThisItem.C1, Scenario: ThisItem.C5, RadioValue: Radio4.Selected.Value, Step:ThisItem.C6, Name_:varUser}
);
UpdateIf(collGUATMasterData, C1=ThisItem.C1, {C3:Self.Selected.Value});

 

0 REPLIES 0

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (74,865)