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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,066)