cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thaynetr
New Member

Toggle Switches Resetting on Edit Screen

So I have a very basic powerapp that is connected to an online Excel sheet. We are using this for clean checks in apartments. I have toggle switches for each item that say whether it is clean or not. Everything works great however, when I go to the detail screen, it shows me the proper value from the toggle, but when I click the edit button in the top right corner and go to the edit page, it moves all my toggles back to their original position. The text boxes contain the same values that were inputted, but the toggles all reset. Any ideas on how I can fix this?

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @thaynetr ,

Have you updated successfully by using this toggle?

If you just insert toggle, but not set it to update function, the toggle will not update value automatically.

Try this formula:  (set the toggle's OnChange)

Patch(tablename,item,{fieldname:Toggle1.Value})

If you have updated value successfully by using this toggle, but in edit screen the toggle did not display right value.

If the toggle is in edit form, try to set it Default

Gallery1.Selected.fieldname   

Or: 

Parent.fieldname

Please replace tablename,fieldname, item will the value in details.

 

 

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.

I have attached some screenshots with descriptions that should help you understand my problem.

Hi @thaynetr ,

Could you tell me

1)the data type of status field?

2)the Item of the edit form?

I assume that it is a choice field.

                       the item is gallery1.Selected

I suggest you set the toggle's Default in the edit form:

If(gallery1.Selected.status.Value="Vacent",true,false)

Or you could also replace "gallery1.Selected" with the item that you want.

 

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.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (67,040)