cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Problem with toggle boxes

Hi PowerApp Experts

 

I have made an app an have problem with identifying my actual problem.

 

I have 3 screens, browse screen, edit screen and display screen - and the interaction works perfect with the text boxes.

 

All my toggle boxes I have set to default: false - so when the user enters a new form, all toggle boxes are showing false value (that is what I want)

 

When all data is entered, it jumps me back to browse screen (works fine) - then I want to get the data displayed on Display Screen - all data fine, false and true values on toggle boxes - then made an edit button - goes to edit screen - then all toggle boxes are reset to default false.

 

I made a OnVisible; refresh('SP list'), but it stills display all toggles as false.

 

What I'm I doing wrong?

 

BR

 

Bo

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @BoWendel 

The reason for this is because you've set the default values of the toggle boxes to false. This means that the toggle controls will show false whenever you create a new record, or view an existing record.

This answer is to set the default value to a formula that sets the value to false, only when a user is adding a new record. The formula you would use would look like this:

If (YourFormName.Mode = FormMode.New, 
    false, 
    ThisItem.YourToggleFieldName
)

 

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @BoWendel 

The reason for this is because you've set the default values of the toggle boxes to false. This means that the toggle controls will show false whenever you create a new record, or view an existing record.

This answer is to set the default value to a formula that sets the value to false, only when a user is adding a new record. The formula you would use would look like this:

If (YourFormName.Mode = FormMode.New, 
    false, 
    ThisItem.YourToggleFieldName
)

 

View solution in original post

Frequent Visitor

Hi

 

Thank you - this work fine!!

 

BR

 

Bo 

Microsoft
Microsoft

Thank you for sharing your scenario 🙂 Have a nice day!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,028)