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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,658)