I have a gallery called Gallery1.
I have a button in the gallery on each "row" called Button11
When i press button 11 i run this.
Patch(InventeringMain;ThisItem;{Inventeringsdatum:Now()})
my datasource is a sharepointlist.
The data is updated in the column.
But the gallery is not updating.
The gallerys ITEM function is set to a variable "varInventeringFilter"
The variable is set on a button
"Set(varInventeringFilter;Filter(InventeringMain;TextInput2.Text in Rubrik Or TextInput2.Text in Enhetsnamn Or TextInput2.Text in Kategori Or TextInput2.Text in Geografiskplats Or TextInput2.Text in Inventeringsdatum))"
But for some reason the gallery is not refreshing and showing the patched data.
I have tried
referesh(datasoruce)
i have tried to use
select(button) - the button that SET the variable. But this resorts the gallery so i do not want to use this one. I just want to UPDATE the just patched data so it can be seen in the gallery.
Yes the data is really patched in the datasource
Patch(InventeringMain;ThisItem;{Inventeringsdatum:Now()}) ;; Refresh(InventeringMain)
Refresh(datasource) does not work, nothing happens.
Only way to get the new updates is to either restart the app or to press a button where i have the filter SET function
But pressing that button will resort the list and that does not work!
Hi @Oskarkuus ,
There will be a solution to this, however firstly the gallery will not refresh (even if the data set is) if it is set to a Variable that still contains the data from the last time it was set.
I am wondering why your gallery Items is simply not
Filter(
InventeringMain;
TextInput2.Text in Rubrik ||
TextInput2.Text in Enhetsnamn ||
TextInput2.Text in Kategori ||
TextInput2.Text in Geografiskplats ||
TextInput2.Text in Inventeringsdatum
)
as the In filter must not be causing you delegation issues.
You could still set the variable as you do now if you use it for other things and the gallery would refresh when this is done to the data source.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Oskarkuus ,
This is a bit of a circular issue. If you set the gallery to a variable that is not refreshed, then the gallery cannot refresh.
I will ask another question - you are using the In filter - are you looking for an exact match or is the user's text at the start of the field.
If either are the case, if you set the Default of all the search fields to "" (empty string, not Blank), you can use
Set(
varInventeringFilter;
Filter(
InventeringMain;
StartsWith(Rubrik, TextInput2.Text);
StartsWith(Enhetsnamn, TextInput2.Text);
StartsWith(Kategori, TextInput2.Text);
StartsWith(Geografiskplats, TextInput2.Text);
StartsWith(Inventeringsdatum, TextInput2.Text)
)
)
and run this after the Patch and data source refresh. The full refreshed list will display until the user inputs some text in one of the boxes.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
had same issue and had to make sure my SharePoint list was a single line of text and that i was converting Now() into a text
see below
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text
The problem you have is that the gallery is set to a variable which is never updated. Your source data is updated, but the variable contains a separate copy of the information which needs to be refreshed. You can either issue the Set() command again every time the source data is updated, or you can modify your Gallery1 Items to refer to the source data directly instead of using the variable. Basically just place "Filter(InventeringMain;TextInput2.Text in Rubrik Or TextInput2.Text in Enhetsnamn Or TextInput2.Text in Kategori Or TextInput2.Text in Geografiskplats Or TextInput2.Text in Inventeringsdatum)" in the Items property. Directly referring to the source data has performance implications, but it is also the least maintenance way to keep the list updated.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
208 | |
48 | |
43 | |
41 | |
36 |
User | Count |
---|---|
291 | |
83 | |
80 | |
80 | |
76 |