cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
balys
Frequent Visitor

Can not save toggle value

Hello All,

This is my second attempt for help regarding Powerapp set up. 

Current set-up: I have a one Screen with 3 toggles: Toggle11/Toggle11_1/Toggle11_2 by default they say No. 

 

With the help of visible I created a wizard like set up - 3 questions needs to be answered YES/NO 

 

I want to configure a Finish button when the selections of toggles would be saved to the SQL DB. 

 

I have 

If(Toggle11.Value = true, Patch( Settings, LookUp( Settings, SettingName = "EnableAllDiagnosticPolicies" ), { SettingValue: "1" } ), Patch( Settings, LookUp( Settings, SettingName = "EnableAllDiagnosticPolicies" ), { SettingValue: "0" }))

 

Which work. 

I want to add another Toggle SETTING 

If(Toggle11_1.Value = true, Patch( Settings, LookUp( Settings, SettingName = "RemediateAllDiagnosticPolicies" ), { SettingValue: "1" } ), Patch( Settings, LookUp( Settings, SettingName = "RemediateAllDiagnosticPolicies" ), { SettingValue: "0" }));

 

AND fail: 

balys_0-1643027470308.png

 

Tried separating these IF statement with AND / O / Semi-colon ";" / && 

 

What I is the best IF statement separator? What I am doing wrong? 

 

Thanks in advance,

Balys

 

 

 

3 REPLIES 3
balys
Frequent Visitor

Fixed it myself. 

C-Papa
Super User
Super User

Concurrent(

Patch(Settings, LookUp( Settings, SettingName = "EnableAllDiagnosticPolicies" ),
{SettingValue:
If(Toggle11.Value,"1" ,"0"}) )

,

Patch(Settings, LookUp( Settings, SettingName = "RemediateAllDiagnosticPolicies" ),
{SettingValue: If(Toggle11_1.Value,"1" ,"0")} )

)

 

 

 

Hi @balys ,

 

I'm very glad your problem is solved and hope your sharing can help more people in the forum. 

 

Best Regards,

Jessica Gu

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,657)