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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

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.

<
Users online (4,468)