cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Toggle button not submitting form

Hi Guys,

 

i want to use a toggle button for simply saving the prior form.

 

I changed the property "OnCheck" to:

 

If(ErrorMessage4.Visible=true, Toggle1.Value=false, SubmitForm(SharePointForm1))

I have severals fields that are required to fill out. So if the Error Message is shown the toggle should reset otherwise the toggle button can stay at the true position but my form should be submitted. And furthermore more it should redirect me the Home page of the SharePoint site.

 

I probably miss something but I dont know what...

 

BR

Pitfrog

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Anonymous ,

Since toggle's value can only be changed by you clicking on the toggle, so the formula "Toggle1.Value=false" will not work.

I suggest you set the toggle's Default to false and change the toggle's value by using Reset function.

 

I've made a similar test for your reference:

1)the formula need to be set to inside the formula that set when the ErrorMessage4 will display.

For example:

I set a textinput's OnChange:

If(IsNumeric(TextInput1.Text),Notify("wrong",NotificationType.Warning)&&Reset(Toggle1))

2)Set the Toggle's Default: false

Set the Toggle's OnCheck:

If(ErrorMessage4.Visible=false,SubmitForm(SharePointForm1))

 

Then, if the value inside the textinput is number, a warning will appear and the toggle''s value will become false.8299.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Anonymous ,

Since toggle's value can only be changed by you clicking on the toggle, so the formula "Toggle1.Value=false" will not work.

I suggest you set the toggle's Default to false and change the toggle's value by using Reset function.

 

I've made a similar test for your reference:

1)the formula need to be set to inside the formula that set when the ErrorMessage4 will display.

For example:

I set a textinput's OnChange:

If(IsNumeric(TextInput1.Text),Notify("wrong",NotificationType.Warning)&&Reset(Toggle1))

2)Set the Toggle's Default: false

Set the Toggle's OnCheck:

If(ErrorMessage4.Visible=false,SubmitForm(SharePointForm1))

 

Then, if the value inside the textinput is number, a warning will appear and the toggle''s value will become false.8299.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,608)