web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Why my data are refres...
Power Apps
Unanswered

Why my data are refreshing in my gallery?

(0) ShareShare
ReportReport
Posted on by 413
Hi there, 
 
I have a nested gallery (Gallery4 is the parent) and I use the data inside it to build a collection, recording the ID of the row and the state of a toggle, linked to a PowerList called "Tracelot - Origini dosatori" which contains the columns "ID" and "Attivo"  (yes/no field).
 
Thinks to know:
- the toggle Default property is setted to
 
ThisItem.Attivo
 
-In the "OnVisible" property of the page is setted to
 
Refresh('Tracelot - Origini dosatori')
 
Knowing this, suppose to start with a configuration called "configuration 0".
 
The idea is to collect the configuration of the toggles. The code is the following and t sets the OnChange property of the toggle:
 
ClearCollect(ColTest;
            Ungroup(
                ForAll(Gallery4.AllItems;
                    ForAll(Gallery5.AllItems;
                    {
                        ID:ID;
                        Attivo: Toggle2.Value
                    }
                    )
                );
                Value
            )
)
 
 
 
 
So now we are in a new configuration we can call "configuration 1" as ColTest we have something like this, and this WORKS.
 
ID Attivo
1
true
2 true
3 false
4 fale
 
 
Now the second step is to patch this results in the powerlist, in order to update the situation. In a button I setted the OnSelect property as follow:
 
    ForAll(
        ColTest;
        Patch(
            'Tracelot - Origini dosatori';
            LookUp('Tracelot - Origini dosatori'; ID = Value(ThisRecord.ID));
            {Attivo: ThisRecord.Attivo}
        )
    )
 
 
 
But the result is that:
 
-the Powerlist is not updated;
-the toggles states updates to "Configuration 0".
 
 
I suppose that the guilty is the Default property of the toggle.
Someone can help? 
 
Thanks.
Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard