I am trying to build a model for a company web tools portal.
The model I came up with was to have two browse screens. In one, the user will see all the different web tools the company has. One of the controls in the template is a toggle. By default all toggles are set to off. It is supposed to act as a filter to determine whether that record should be displayed in the user personal screen (Screen_2)
The user will then turn on the toggles for the tools they want on their personal screen (screen_2).
Is there a way to create a function for the toggle to make it updates the corresponding record ONChange?
In general, you'd only need to filter the first gallery - Filter(yourToolGallery, yourToggle.Value)
This will return a table of all of the toggles items from the tool gallery.
You can use that formula as an Items property for your other gallery.
I hope this is helpful for you.
Thanks Randy. Yes and No. The part I am struggling with is having the toggle change the Show value as soon as the state changes. Since the users are not 'Editing' the record, I need that record to be updated as soon as the value of the toggle changes.
Formulas that reference controls in PowerApps are updated immediately. So what I mentioned about the Filter on the Gallery would immediately reflect the change.
But, are you stating that when the user changes the Toggle, you want to update the record in the datasource?
@RandyHayes Indeed. There is a Yes/No choice field in the Sharepoint List that indicates if the user wants to see this item in their browse list. So the I want to use one browse gallery with all available items and each with their own toggle, so that after the user visits that gallery, a second browse gallery only shows those items where the users put a toggle on the show position.