Hi i have this gallery in my app browsegallery1 with this on Items = SortByColumns(Search([@POOL], TextSearchBox1.Text, "MATERIAL","NOMENCLATURA","NUMERO"), "MATERIAL", If(SortDescending1, Descending, Ascending))
In other Screen i have two buttons, i want to filter the gallery with the column "MATERIAL", i have two options there "CEMENT" and "pouzzolane"
i have this code in the buttons but it doesn't do anything
thanks in advance
UpdateContext() only works on the same screen. You need to use a global variable if your variable is on another screen: Set(ds, Filter(POOL,MATERIAL="PUZO")) should do the trick.
Like Drrickryp said, updatecontext is a local variable compared to a global from Set(). If you are working with both, be sure to label the variables as such. I had a big issue with accidentally using a local variable that had the same name as a global variable. Or the other way around, I completely overhauled the code instead of trying to find where the wires got crossed. For globals I use either varTest or glblTest and for locals I use lclTest or locTest. Whatever you use, be consistent and do not change all willy nilly or it just creates more headaches.
Thanks for the help, it didn't Filter the gallery
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!