Тёмный
No video :(

QTT - Why do you keep using the Powerapps refresh function? 

Shane Young
Подписаться 164 тыс.
Просмотров 42 тыс.
50% 1

Опубликовано:

 

27 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 222   
@HypaspistOrange
@HypaspistOrange 3 года назад
Mr Shane thank you for helping me see the light. We migrated our powerapps datasources from excel tables to sharepoint lists and patches ended up taking several minutes. Went through just now and uprooted almost every single Refresh and the difference is unbelievable. I'm a refresh truther now!!
@ShanesCows
@ShanesCows 3 года назад
Awesome 👏
@dichternebel01
@dichternebel01 3 года назад
Just want to say thank you Shane. I never used refresh so far but asked me just yesterday how I could select an item and show the selected item in one screen. Now I know that forms is the way to go.
@ShanesCows
@ShanesCows 3 года назад
Awesome 😎
@derek_shannon
@derek_shannon 3 года назад
How refreshing to learn this! I paranoidly refresh before rejoining collections, I will try to chill ;-D
@ShanesCows
@ShanesCows 3 года назад
Approved. 👍
@darylt11
@darylt11 3 года назад
Very insightful Shane! I've been using Refresh.... a lot! Time for a re-think :). Merry Christmas to you, Nicola, and Chewy!
@ShanesCows
@ShanesCows 3 года назад
Thanks and Merry Christmas back at you. 🎄🎅🐶
@SkarpHedinn
@SkarpHedinn 3 года назад
I don't think I've ever had to use refresh() in a standalone Power App. However, I have repeatedly had to use it in customized forms embedded in a SharePoint list. The basic problem was that a user could edit a form click save, and then if they reopened that item again in the list edit (without refreshing their browser or clicking on a new item in the list) the old data would still be there. It led many users to thinking their changes weren't being saved, or worse, they'd re-save a new change to find their earlier thing they corrected was wrong again. Only solution that worked, suggested on the PowerApps forums, was to refresh the datasource as part of the OnSuccess property of the edit form. That post on the forums still gets lots of hits even a year later.
@ShanesCows
@ShanesCows 3 года назад
Interesting Adam. I haven’t ran into that but thanks for sharing.
@davidgraf8012
@davidgraf8012 3 года назад
@@ShanesCows - I've run into the same thing that Adam Deich reports on several PowerApps applications. It's a bug in my opinion.
@patrickcooley9708
@patrickcooley9708 3 года назад
NO FIDDLING REFRESH! Got it, loud and clear..."no what's, if's, or but's". Another good one, Shane : - )
@ShanesCows
@ShanesCows 3 года назад
🐶 Have a great weekend Patrick
@williambest8415
@williambest8415 3 года назад
Hey Shane. New user. Love the videos. They are HUGE timesavers for getting familiar with Power Apps. Thank you!
@ShanesCows
@ShanesCows 3 года назад
Happy to help
@JoeChampagne
@JoeChampagne 9 месяцев назад
Great content! This solved an issue for me where my flow completion was happening and the gallery wasn't getting updated. Refresh wasn't even working. Patch solved it.
@ShanesCows
@ShanesCows 9 месяцев назад
Great to hear!
@crowfriend3778
@crowfriend3778 Год назад
Really clear as always Shane, thank you! I always learn a lot from your videos.
@ShanesCows
@ShanesCows Год назад
Thanks 😊
@tenisviejos
@tenisviejos 3 года назад
Thank you THANK YOU! this has a huge impact on bandwidth and performance. Great Tip!
@ShanesCows
@ShanesCows 3 года назад
Awesome 😎
@tonitsi78
@tonitsi78 3 года назад
Thank you. This was a REFRESHING piece of knowledge.
@ShanesCows
@ShanesCows 3 года назад
I see what you did there. 😂
@josephjojo756
@josephjojo756 8 месяцев назад
Hello Shane, thanks for the explanation. Since the video uploaded around three years ago, I'm asking this question. Is the refresh function still responds the same way as you mentioned? I have a requirement to show content in a table/gallery but need to see live updates (not really live updates but needs to see if any updates made) if another user updates another record same time. I was thought about make use of refresh with timer control, but as you mentioned the refresh function will invalidate the cache and reloads all records, without considering filters, but the table which I shows the data have a filtered content and which will end up with multiple API calls. Could you please suggest me a better way, or if this is already fixed in PowerApps?
@davidjimenez8952
@davidjimenez8952 3 года назад
Merry Christmas ! I love this new look and of course your tips.
@ShanesCows
@ShanesCows 3 года назад
Thanks David! Happy holidays to you. 🎉
@starmole5000
@starmole5000 3 года назад
I've been waiting for this for ages lol. let's find out why I use it...
@ShanesCows
@ShanesCows 3 года назад
I hope you enjoy!
@alexanderr2688
@alexanderr2688 3 года назад
Thanks for the video Shane :) Apparently, I will try to use less Refresh the function, but I cannot stop using it at all, sorry. There were a lot of situations when I used Patch the function to update a field value (its type is "*blah-blah*.SharePoint.SPListExpandedReference") in my SPO list, and I was getting an error. I don't remember the error's text, but the meaning was "something went wrong on a server side, you should update the data source)". And... (I'm really sorry), for now, I am using Refresh call BEFORE the Patch and Refresh AFTER the Patch. Such configuration is the only one option that I found to avoid the error. Thank you a lot for your videos, it's really helpful and useful. Merry Christmas to you and Happy New Year 🎄 🎄 🎄
@ShanesCows
@ShanesCows 3 года назад
No reason to apologize. I just provide the info so you know how it works. Up to you to best apply it. 😀
@shrutikapatil9804
@shrutikapatil9804 3 года назад
Thanks, Shane for the amazing video!!! I am having trouble refreshing the Gallery that's bound to the Activities Entity. Inside the gallery, I have control to mark items as complete. I am running the Patch function on the type of the object but as its' a polymorphic field, I have to call the Refresh Activities entity to see the latest result. Please suggest how I can work with polymorphic fields.
@ShanesCows
@ShanesCows 3 года назад
Yikes, I haven't done that scenario yet so not sure. Sorry
@q-breezy4826
@q-breezy4826 3 года назад
If you use collections, then instead of fetching all N records by simply invalidating cache (even using the method shown here to invalidate just a single time), you can instead patch a record in a list, and then patch/update your collection for just the single record that was patched. So if you get 473 delegated records out of 10,000, instead of just getting all 473 records again a single time, you can get just the single record that was modified instead.
@EduardoCastro95
@EduardoCastro95 Год назад
I've used refresh once with a timer because client want a "real time" chat with teams direct from powerapps. I'm not sure is there is a better way to do it but for now it do the job. It scares me when lots of users enter the app and uses the chat at the same moment haha
@ShanesCows
@ShanesCows Год назад
Agree. Glad you got it working but scares me is how I would have explained it also. 🙃
@AndreasMake
@AndreasMake 3 года назад
Shane, this info was like an eeeeeeaarrly summer beer, very refreshing. Can you make this a series of videos about optimizations? Or perhaps not, I already got an early Christmas gift. ;) have a good one Shane and thanks.
@ShanesCows
@ShanesCows 3 года назад
The great response I have had to this one means more like this coming for sure. 🎄🎅🎉
@powerapps101
@powerapps101 2 года назад
I just saw this video, woow I was suprised that it was true haha I don't know why I even use it at this moment anymore. Most of the time I'm just adding records with a form and showing those records in a gallery. Thanks a lot this will improve my apps performance a lot!!
@saurabhtalele1537
@saurabhtalele1537 2 года назад
Hi great video tho,I have written a custom connector but data in the gallery is not refreshing .whay?
@developermct
@developermct 3 года назад
If you have more than one user modifying the same set of data in the same PowerApp app, the only way PowerApps will know of these other changes is for a Refresh() though, right?
@ShanesCows
@ShanesCows 3 года назад
Correct
@Worrelpa
@Worrelpa 3 года назад
Well explained Shane good simple explanation Hope Microsoft can fix it at some point. It is very similar to how notepad writes data of text files. It writes the data. Reads it, deletes it then writes it again and reads it back just to save data. That one is legacy though from when disk storage was unreliable. Happy holidays to you your family and team.
@ShanesCows
@ShanesCows 3 года назад
Thanks Phil. Happy holidays to you and yours. 🐶🎉
@rseiler
@rseiler 3 года назад
A possible sequel (or sequels) to this video might be what to do when doing *something* is needed in the particular scenario (unlike the one you showed) and what to do in those scenarios instead of refresh. Perhaps pick the Top 10 most common situations where nothing isn't an option for the desired functionality.
@ShanesCows
@ShanesCows 3 года назад
I like the idea. I already have one follow up in mind. :)
@AhmedThahir2002
@AhmedThahir2002 11 месяцев назад
@@ShanesCows any updates on this?
@ShanesCows
@ShanesCows 11 месяцев назад
@@AhmedThahir2002 I did not. The most common reason is if their is a flow involved that is updating data.
@Rajeshsingh-ws5th
@Rajeshsingh-ws5th Год назад
but what if something get updated from other service in that table and user who has opened it should see the changes at the time changed?
@ShanesCows
@ShanesCows Год назад
If you another service changes the data then Yes, you will need to use Refresh. :)
@davidpiche4072
@davidpiche4072 3 года назад
I can assume my scenario is the 1 of 100 where it can be used? I have buttons visible / not visible by permissions which are delegated by a users need to navigate to certain screens or not to have access. If a user currently does not have access and the manager needs to allow a user to that area while the person is in the app, the user will not see the button unless they completely log out. Thus I put a Refresh(SPList) that will refresh the info, thus giving them a visible button to be able to get to that needed screen.
@thelegand1
@thelegand1 Год назад
I have my users patching a sharepoint and approver users who ackowledge and approve users submissions, the only option I know of is refresh (i'm a novice) to make the submissions appear for the approvers after the user patches them, is there a quicker way to do this? Like adding the whole sharepoint list into a collection on startup and then just patching the most recent 50 records or something to the collection when they refresh, would that work and would it even be quicker?
@ShanesCows
@ShanesCows Год назад
Yeah if things are being updated from outside forces then you will need to do the refresh.
@stenseenonwuliri7079
@stenseenonwuliri7079 Год назад
What if i updated a record column using power automate and not powerapps. How do i get the data back into powerapps without using refresh?
@ShanesCows
@ShanesCows Год назад
That is a case where you have to use Refresh
@junelbuitizon3378
@junelbuitizon3378 3 года назад
Marry Christmas Shane. Lol 🤣
@ShanesCows
@ShanesCows 3 года назад
I look good in that hat. 😋
@faharalzadjali5606
@faharalzadjali5606 3 месяца назад
Hello shane I have an issue in my app I created sharepoint list and i put the title field as an Id auto increment in the power apps.. But assuming two users are in request page and the title shows #13 for both users so once the two users submitted in the same time in sharepoint it saved two records with same title So how the power app knows the other user is already submitted the request and the title should refreshed
@ShanesCows
@ShanesCows 3 месяца назад
This video talks about duplicates. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Ap3_Ea9H8b0.html Keep in mind the built in SharePoint Column called ID already handles your unique identifier. Could you maybe just use it.
@franciscojaviere.5686
@franciscojaviere.5686 2 года назад
Gracias Shane, me ayudo mucho comprender el error que tenia al refrescar las listas dentro de mis funciones concurrentes. Tienes un video que hable respecto al uso de funciones concurrentes o asíncronas sobre power apps?
@moyura2
@moyura2 2 года назад
Hi Shane, how woould get the latest records which updated by a different user on a difference device without using the refresh function ?
@ShanesCows
@ShanesCows 2 года назад
You would have to refresh in that case.
@karnasaurav
@karnasaurav 3 года назад
I have a Gallery on one Page and the form for the gallery on the next page. In the Edit Form, I also have a custom DataCard along with the default ones, because of which I need to use both SubmitForm and Patch (for the custom datacard) for saving the data. The problem is , the data in my Gallery is not updated just for the custom datacard. It updates in the SharePoint list but not in the Gallery. The value only refreshes when I use the Refresh Function to manually refresh the data. What should I do?
@ShanesCows
@ShanesCows 3 года назад
What is the datasource for the gallery? If it is the list you are patching it should refresh. But if you have to refresh you have to refresh
@karnasaurav
@karnasaurav 3 года назад
@@ShanesCows I am using SPO as datasource. Maybe I can email you about the issue I am facing?
@CuratedHistories
@CuratedHistories 2 года назад
So if you make a change in your data source, which in my case is SharePoint I don't need to refresh my data source in the App? So I make changes to my SharePoint list does the app automatically sync that data into the app? I just finished building my very first app so I am not familiar with how it all works.
@ShanesCows
@ShanesCows 2 года назад
Hi Amy - If you are changing the SP list from within Power Apps then, yes, the data in the app is refreshed. If you are changing the SP list using something else (like directly in the browser) then No, Power Apps doesn't know about the change, and you would need Refresh.
@romerbi
@romerbi Год назад
Hi Shane, I've tried not to use refresh, but if some other guy uses the app in another machine at the same time and change some data, I'm still viewing the old records in my screen. My scenario is: one screen to select one item in a combo box, and then I call the other screen sending an environment variable with the selected item. In the 2nd screen I have a form setting that enviroment variable within the item property. What do you recomend to always see the last updated data?
@ShanesCows
@ShanesCows Год назад
This sounds like a scenario where you have to use Refresh. They happen. Glad you gave it a good thought before just doing it, that was my hope. 😎😎
@romerbi
@romerbi Год назад
@@ShanesCows and how can I to get ride off the cache without loading the whole 100 first rows (when use refresh). After all I just need that PowerApps needs to ask for the rows it has to show.
@sangoan3902
@sangoan3902 2 года назад
Refresh function does not seem work on custom page on model driven app
@kyrstincote637
@kyrstincote637 11 месяцев назад
I have some viewable fields in a Form that don't seem to update, even upon Submitform. The editable pieces do update. Would a patch help?
@jof_diesel3253
@jof_diesel3253 11 месяцев назад
How would someone refresh(update) the data source used to get the most recent info from List's in SharePoint when they select the item and navigate to screen 2 containing an edit form? I have tried refresh before resetting my varformdata and before navigating, but still, the data is old when on screen 2 edit form. It is not until I go back to homescreen that the info displayed is current.
@cvkealey
@cvkealey 3 года назад
Related question I can't seem to find an answer to: how frequently is data from SharePoint updated in an app? In other words, if there is a flow or other process outside the app that's updating the data, what is a realistic timeframe to expect the update to appear in the app.
@ShanesCows
@ShanesCows 3 года назад
It will it appear without a refresh in that case. Power Apps will keep the cache forever if it doesn’t reset
@jsunnb
@jsunnb 6 месяцев назад
So I know this video is 3 years old, but I thought I'd ask anyways. I have Galleries that are loading from SQL views. When I do a Patch() on the table, that view won't show it until I refresh. Am I forced to keep using views, or is there a better way?
@ShanesCows
@ShanesCows 6 месяцев назад
If you are using SQL Views then you have to use Refresh.
@jsunnb
@jsunnb 6 месяцев назад
@@ShanesCows , thank you so much for the quick reply! Understood :(
@williamdyette1262
@williamdyette1262 Год назад
After editing and saving the form, the data does not update unless you navigate away and then back to the screen with the form on it. After researching, I changed the Items property of the form from varRecord to LookUp('your datasource', ID=varRecord.ID) and that seems to work. I thought this might help everyone. Thoughts?
@ShanesCows
@ShanesCows Год назад
William you can have the form OnSuccess property set your variable for you. Set(varRecord, formname.LastSubmit)
@williamdyette1262
@williamdyette1262 Год назад
@@ShanesCows Brilliant! Hadn't thought of that. Thanks.
@TheShalabh
@TheShalabh 2 года назад
I keep getting etag conflict error even when I use or dont user refresh functions. I am doing a patch on each form and hence refreshing before a patch statement, still the error continues to be an issue for me.
@TheRemyRomano
@TheRemyRomano 2 года назад
I am using refresh for a dashboard situation where we want the dashboard screens at different locations to update at a specific interval without any user interaction. Is this a correct usage or should I be doing some thing else?
@marc-rossmann
@marc-rossmann 9 месяцев назад
Hi Shane, what do you do on the case of a Gallery what is connected to a collection and the collection is changed via an edit screen. When you go back to the gallery screen the gallery is not refreshed?
@siyandakhanyile210
@siyandakhanyile210 3 года назад
I want to cancel a meeting on my App, after canceling it does not disappear instantly from the gallery, only when I leave the page and come back, does the canceled meeting disappear.
@ajambo2010
@ajambo2010 3 года назад
Thanks, Shane. Many of your Powerapps videos have been incredible useful for my own app building. I have hit a snag which I though Refresh might sort out but it has not. Have you come across the following scenario? I have created a Screen with an EditForm > made a changes > SubmitForm > ViewForm. The new changes are saved to the sharepoint datasource but do not show on the form (now in view mode) unless I go back to the gallery and reinvoke the form.
@ShanesCows
@ShanesCows 3 года назад
This usually only happens if your form or gallery is using a variable or a collection that you need to repopulate instead of referencing the data source directly.
@ajambo2010
@ajambo2010 3 года назад
@@ShanesCows Yes, that was it. Solved it using the LookUp function. Thanks. powerusers.microsoft.com/t5/Building-Power-Apps/Form-in-current-screen-not-updating-after-Submit/td-p/650664
@siferg5601
@siferg5601 3 года назад
As always, thanks Shane!
@ShanesCows
@ShanesCows 3 года назад
Glad to help. 😀 🐶
@emmanuelmaceda2475
@emmanuelmaceda2475 3 года назад
Hi Shane! Thanks for this vid and hope you are enjoying the holidays! Just to clarify, does SubmitForm have same effect to cache as well?
@ShanesCows
@ShanesCows 3 года назад
Thanks and yes it does. 😎
@yoismelperez2744
@yoismelperez2744 6 месяцев назад
Thanks for sharing. I have a flow which deleted records. Records are successfully deleted. I do a Refresh, but records still show for a few minutes. What will be the best solution in this case?
@TheAmazeer
@TheAmazeer Год назад
Hi Shane evertime I modify a gallery with editform the gallery doesn't refresh.. I need to exit app and launch it again.. Excel source file is updated but the browse gallery screen doesn't refresh? I can't use patch because I'm not adding a line to my excel file I'm only modifying the existing ones.. In the past it used to work even if it was a bit long to refresh that's true.. So how to refresh without the refresh function or patch function? We are actually 6 persons working with the at the same time, ! Thanks for your help
@shanenleen
@shanenleen 3 года назад
Hi Shane, What if the app is concurrently used by multiple users (Say 3-5)? This app has a gallery of items which an user can change and save. I want to update the changes that one user does in all other logged logged in user screens.
@ShanesCows
@ShanesCows 3 года назад
Then you may need to refresh
@shanenleen
@shanenleen 3 года назад
Thanks for getting back! Learnt a lot from your videos 👍
@charlesfoenkinos3536
@charlesfoenkinos3536 3 года назад
Hi Shane, I have a Powerapps Application based on an excel file in OneDrive. Excel file is refreshed with new data regularly (outside the powerapps application) but the application doesn't refresh when the file is updated while the application is already running. Do you have an idea how I could manage this issue? I used Refresh function but it doesn't work all the time.
@ShanesCows
@ShanesCows 3 года назад
Refresh would be your best option. I would also consider moving from Excel as a datasource. It isn’t the most robust and suffers from sharing and locking issues. SharePoint is the best free alternative
@reconranger1370
@reconranger1370 3 года назад
Does this also apply when using SharePointIntegration. By that I mean we've used PowerApps to build a custom form for a SharePoint list. When we update a List records, we use the Refresh on the SharePoint list to show the updated record in the list.
@ShanesCows
@ShanesCows 3 года назад
It shouldn't be necessary but some people (other comments) have reported that some of the SHarePoint Integrated scenarios do require it.
@adrianrolon5904
@adrianrolon5904 3 года назад
Excellent video, again! Suppose there are multiple users interacting with the same database through the app, and one of them modifies a record. Then the other one as he sees the record in the previous state, modifies that record again (without knowing his coworker already did), but in a different way. Hoy can I make the app keep up with the changes being made so this mistakes won't happen?
@JonH232
@JonH232 3 года назад
If they're modifying different fields you could use Patch.
@ShanesCows
@ShanesCows 3 года назад
You would need some form of checking or Refresh. Sometimes it is necessary
@reconranger1370
@reconranger1370 3 года назад
Great Video and info Shane, thanks!!
@ShanesCows
@ShanesCows 3 года назад
Glad you liked it!
@et6136
@et6136 3 года назад
I use Refresh for checking if my data has changed outside my PowerApp. I do not like this solution so I was wondering how to do this in an other way. My data gets changed externally by a flow that picks-up a mail to a Team channel. The Flow then updates a SharePoint list, but I don’t think I can trigger my PowerApps app from within this Flow. (SignalR would be nice.) So I was thinking on updating a very small extra SharePoint List, with only a DateChanged field. So I can change this DateChanged List at the end of a successful Flow Run. Then I could check this small SharePoint List for changes with Refresh from within my PowerApp, and notify that the Data has changed. Without getting all the data from the main SharePoint List. But is there a better way to check if the data has been changed outside the app? Thanks for all the great video’s!
@ShanesCows
@ShanesCows 3 года назад
Nope. This is a place refresh is needed.
@4rpa39
@4rpa39 3 года назад
On Dataverse, when using a input search sort against a gallery, nothing shows up unless I write something and delete it all, then The whole list displays
@ShanesCows
@ShanesCows 3 года назад
I am not sure. Maybe leave another comment with the formula. I don’t follow
@anthonysalve2756
@anthonysalve2756 3 года назад
How would you approach a scenario wherein multiple users submits a record using Edit Forms, but it doesn't show in your gallery. You probably need to refresh your browser or use a refresh function. Or is there any other way?
@ShanesCows
@ShanesCows 3 года назад
You would need to refresh in that case.
@paolovr1970
@paolovr1970 2 года назад
🙏 thanks but Shane if I use a view sql for my gallery show and patch the table that's on this view I need to reset gallery or refresh the view correct? Or do you have other trick 😎😎
@ShanesCows
@ShanesCows 2 года назад
Sql views do require refresh 😑
@davidbohland5079
@davidbohland5079 3 года назад
Made the change. No longer using Refresh on a screens OnVisible. But now users can't see changes others make to a gallery unless they submit something to the gallery themselves... Do I fall in the 1%? Not a train smash, as it will be rare for a user to be putting the same thing into a Gal but non the less.
@ShanesCows
@ShanesCows 3 года назад
You would need a refresh to see other user's changes. Maybe give people a manual refresh button instead of just always triggering it? Also, if you read the other comments there are some neat ideas of ways to fake a refresh I keep meaning to try. But yes, you can just live it as is and I wouldn't tell Chewy to bite you. 😀
@davidbohland5079
@davidbohland5079 3 года назад
@@ShanesCows I was reading down in the comments and was going to ping you back and say, I'm good (since you answered this a few times) but you beat me to it. Thanks, Shane! I'll keep reading to see what nifty tricks folks are doing.
@MrDashingAshish
@MrDashingAshish 3 месяца назад
Is there any update on Refresh @Shane ? Will a flag set to true/false help on click of button to update items property ?
@shadyamigo
@shadyamigo 3 года назад
Dear Shane, I have just started with powerapps and your videos are so useful and clear. Is there a video where you show how to update multiple items in one go , for example in the native list environment you can select multiple items , click edit then just update specific fields in the form in one go (while leaving others as is). Id love to be able to do this in powerapps but can't work out how to do it.
@carlosalexleon
@carlosalexleon 3 года назад
I believe you may be looking for the patch function. He has videos showing you how to update specific areas of a list using patch.
@shadyamigo
@shadyamigo 3 года назад
@@carlosalexleon Thank you Carlos. Maybe I can loop through the form controls to see which ones have been edited
@ShanesCows
@ShanesCows 3 года назад
Try this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MclJ_O9HvJQ.html or this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0xZ4fMJbLvk.html
@shadyamigo
@shadyamigo 3 года назад
@@ShanesCows thank you Shane. Much appreciated
@paulkroon
@paulkroon 3 года назад
Just got an idea on how to refresh just the gallery. Maybe it would work to add a boolean variable which you toggle with a timer. Then in the filter() formula you add a Or() formula which checks your variable to be true or false (which always returns true ofcourse). Because the filter() formula is changed the data is fetched from the datasource. I will try this out later today, but what do you think Shane would this work?
@ShanesCows
@ShanesCows 3 года назад
Your video showed that it does. 🤩
@gustavomonne4921
@gustavomonne4921 3 года назад
Great tip, Thanks Shane
@ShanesCows
@ShanesCows 3 года назад
You are welcome 😊
@FallenAme
@FallenAme 3 года назад
Was hoping that I had been doing it wrong and that there was an alternative. But I still need to use refresh as multiple people are using my apps. So I have it placed before patching and before opening records.
@ShanesCows
@ShanesCows 3 года назад
Sometimes it is necessary. My goal was to at least make it all make sense. I will say there are some other comments about using a fake patch instead of Refresh. I like this idea, but haven’t tried it yet.
@FallenAme
@FallenAme 3 года назад
Sounds like a very good idea to investigate! :) thanks for all the effort you put into your videos.
@garyb078
@garyb078 3 года назад
Hey Shane. I have several use cases where multiple apps adjust the same datasets. Would it be possible (and more efficient) to use a reset function on the gallery to trigger a refresh on just those filtered items shown?
@ShanesCows
@ShanesCows 3 года назад
Probably. If you check the other comments there are some clever ideas though. Maybe the fake patch?
@tonya3308
@tonya3308 3 года назад
I had used refresh more than necessary; however, I have an app set up where I populate six SharePoint lists with default data when a new order has been entered so that the tables exist for the next entry form - SharePoint seems to choke without a refresh after each of patches, which i have set up to run after the initial entry and after the user clicks the submit button - any ideas on how to throttle the flow to SP so it doesnt freeze? I had a refresh after each and it seemed to work fast than without the refresh.
@ShanesCows
@ShanesCows 3 года назад
Hmmm. That seems odd. If refresh is working for you then maybe don’t change. Not sure how it is faster but 🤷‍♂️
@deanliu610
@deanliu610 2 года назад
This is really great video. Solved my problem! Many many thanks
@jatinsaini7773
@jatinsaini7773 Год назад
Hi Shane, great video. But I have one concern. I am using a collection which is storing the data source data and reading data from collection to avoid delegation issues. Now when I update,patch or remove something from my data source. The collection is still holding that data which is why am using refresh function and then collecting that again into collection. Is there any other workaround for this? Pls help
@AssassinUK
@AssassinUK 3 года назад
Good to know. I use collections mostly. I create a collection in appstart, or even a blank collection to get the schema of the DB source. I can update the collection and then patch the Collection to the DB at the same time. Notice my apps run real fast! Any downsides to this that you can think of?
@ritabpedrosa
@ritabpedrosa 3 года назад
I work with collections in appstart too. Waiting for Shane answer :) :)
@AssassinUK
@AssassinUK 3 года назад
@@ritabpedrosa me to.
@AssassinUK
@AssassinUK 3 года назад
@@ritabpedrosa I use collections, especially if I'm dealing with a smartphone app. I might be pulling in 3000 to sometimes even 10,000 plus records into the app and storing them in a collection then saving data to the device. So when the app loads on the smart device, it loads the data from the device back into the collection without a DB call. You do need extra checks and a DB setup to facilitate this and check and install updated and new records though.
@ShanesCows
@ShanesCows 3 года назад
Not that I can think of. 😎🐶
@saradehond3293
@saradehond3293 2 года назад
@Shane Young is there a way to not use Refresh if the data is updated by power automate? The app i Have uses around 11 flows to update from external sources. I'd rather not use the refresh... or try to limit it?
@honestopinion10
@honestopinion10 3 года назад
@Shane Please reply to my question. Thank you you proved refresh is not needed in standalone app, but i want to tell you that it needed in sharepoint customized list forms. I will tell you why?... Basically if we are using a sharepoint list sidebar/popup window for opening a list form it loaded the value from cache and to refresh the value in the cache we need to refresh the data source otherwise we seen that it was showing values for different record which was opened previously or which is present in the cache. I don't know when Microsoft will resolve that issue, but we tried to open form in new tab and this way we don't have the cache issue. If you have any solution for not using cache while opening a form in sidebar/popup please let us know. Thanks.
@ShanesCows
@ShanesCows 3 года назад
Adam had a similar comment also. I haven’t ran into this before but sounds like it is a known issue.
@RiderInHell
@RiderInHell Год назад
Well, if you run a flow to run a sql server stored procedure AND using views as data sources I'm sure they won't refresh themselves. I haven't tested it yet (fairly new to powerapps) but based on what you said, since it's an outside change powerapps doesn't know about it.
@brijendraydv
@brijendraydv 3 года назад
Thanks but what if my data source is updating every minute in that case i need to refresh right?
@ShanesCows
@ShanesCows 3 года назад
Yes, probably.
@eddycho5358
@eddycho5358 3 года назад
Hi Shane, I have a situation where I edit an item from my gallery. Then I went back to the viewform of that item but it doesn't reflect the "Edited" fields it's still showing the old data. I tried refreshing the SharePoint data source but it doesn't help hmmm
@ShanesCows
@ShanesCows 3 года назад
Did you SubmitForm after making your edits. THat is my only guess.
@victorramosmaq7419
@victorramosmaq7419 3 года назад
If the update of sharepoint list is done by another app and I just need to be sure that the item is showing has the updated fields. The only way is doing refresh?
@ShanesCows
@ShanesCows 3 года назад
Yup
@HarikrishnanP
@HarikrishnanP 3 года назад
Hi Shane. I'm creating an item from PoweraApps using Flow. In that case do you think the gallery will be updated automatically or do I need to force?
@ShanesCows
@ShanesCows 3 года назад
Test it. I have seen mixed results depending on the scenario.
@mjespersgaard
@mjespersgaard 2 года назад
Hi Shane, this video is from December 2020, do we know if Microsoft has changed the Refresh behavior, or does it still act the same way? Love your video and enthusiasm when explaining 😀
@davebarnett7026
@davebarnett7026 3 года назад
Shane. I know this is not refresh. But how would you check chars entered into a field. Are not illegal? EG. No '&' in a URL request?
@ShanesCows
@ShanesCows 3 года назад
Maybe look at Match function or find to see if there are any illegal characters?
@gavinm2339
@gavinm2339 3 года назад
Thanks - interesting to see the nerdy details behind the scenes. Just confirming - if you have a number of users that are frequently updating the same data source - refresh is still acceptable? I have an app which a number of users access and update at the same time - I have a timed refresh to make sure that each user gets the changes made by other users. Also interested in use of Fiddler. I've started using the PowerApps monitor recently to find bottlenecks and improve performance. Any views on that (Fiddler vs Monitor)? Might be a whole video on tracing and top performance improvements (hint hint).
@ShanesCows
@ShanesCows 3 года назад
Yes, on your refresh idea. As for Fiddler vs. monitor. That would be fun. Monitor still has some nuisance where it doesn’t show you the full truth. I tried to make this video with monitor and it left out stuff. So I went to Fiddler for the absolute truth.
@mr_don_key
@mr_don_key 3 года назад
but what do you suggest instead? i mean whenever one app user changes something in a list, that is visible in a gallery for another app user, it won't update for that user. He/she needs to reload either the app or do a refresh. (no signalr type of behavior as far as i see) how to do this then?
@datthanh5281
@datthanh5281 Год назад
Hi Shane, awesome video. All your videos help me a lot. But I have a scenario that I import file by flow and then need to show for customer immediately. So should I use "refresh"
@GoWstingray
@GoWstingray 3 года назад
So I noticed if i use a flow to upload a document to a sharepoint library (thanks for the info from a past video btw) i needed to use refresh to get the gallery to display the uploaded document thumbnail and it was hit and miss! However if i stick a respond to powerapps at the end of the flow the app obviously waits for the flow to run and i no longer need to use refresh and gallery updates but all im passing back was the document identifier. Not sure why it refreshes the gallery, same reason you think? Thanks Shane.
@ShanesCows
@ShanesCows 3 года назад
Interesting I am not sure why either. Power Apps and Flow do talk. Maybe flow told Power Apps to invalidate the cache? 🤷‍♂️
@ritikawasthi2170
@ritikawasthi2170 Год назад
Is there any way to refresh a collection?
@ShanesCows
@ShanesCows Год назад
How did you populate it to begin with? Rerun that code using clearcollect
@ritikawasthi2170
@ritikawasthi2170 Год назад
@@ShanesCows yup i followed the same, Thank you Shane.
@threewiseman1
@threewiseman1 3 года назад
I have 30+ users submitting new records, updating records, and patching in some cases as well throughout the course of a day, to my primary database. Without refresh, any record one user submits won't be visible to other users until after refresh - or have I been wrong about this the whole time?! O.O
@AssassinUK
@AssassinUK 3 года назад
Well if user A makes a update to the DB, user B wont have a clue the new record is there without a refresh. But how often should there be a fresh on the DB, especially if the dataset is big? You would need a timer option to do an auto refresh to check for new data.
@threewiseman1
@threewiseman1 3 года назад
@@AssassinUK Yes that's right. I have a timer set for 1 min. I get around the large slabs of data by putting images into another db, then using a lookup function to link the two databases together.
@AssassinUK
@AssassinUK 3 года назад
@@threewiseman1 no, you should be keeping all that data in one DB. When you pull the data in the 1st time you should limit the columns you want by using ShowColumns or DropColumns I think. If your keeping most the columns use Drop, otherwise use Show. This limits the data your bringing accross. You can then filter the same DB later to get the image and use ShowColumns just to bring over that image column only. Either way, no need to manage multiple DBs when you only need to manage one. 😉
@threewiseman1
@threewiseman1 3 года назад
@@AssassinUK Yeah, that is true, but there is another reason I split the data sources - my images need to be in unique columns, not attachments, and they are base64 strings that get uploaded to out blog site, as well as downloaded and converted into jpegs with specific names. It's complicated to explain, but it's working well.
@ShanesCows
@ShanesCows 3 года назад
Good chat here. 😎 Check out the video Paul posted in another comment. Neat way to think about it.
@tonykuiper9127
@tonykuiper9127 3 года назад
Hi Shane... Very interesting video! One thing I have not been able to find (may not exist) is a "code view" of the app. In "the old days" I dabbled with VB4. One of the neat features was that you could dump the entire code of the application and its GUI and scan it for dumb or redundant stuff. Is there such a thing in Power apps? It would be nice to dump the code and search it for say uses of redundant variables or leftover testing code such as labels that are set to not visible (because they were used for testing as separate from being used behind the scenes legitimately)
@ShanesCows
@ShanesCows 3 года назад
No code view today. 😑
@ronaldsease9243
@ronaldsease9243 3 года назад
Thanks so much! This was very helpful. I have been trying to figure out why Refresh seems so awful and clunky. Follow up question that some others may have. You said the Patch function invalidates the cache. When using a Form control, does a SubmitForm function call invalidate the cache as well? Thanks again and love your videos! I share them with my development team regularly.
@ShanesCows
@ShanesCows 3 года назад
Yup. 😎
@paulkroon
@paulkroon 3 года назад
I would think a form would use a patch() function itself in reality. Do you know whether this is the case Shane?
@ShanesCows
@ShanesCows 3 года назад
It uses a different process but makes similar calls I think.
@ronaldsease9243
@ronaldsease9243 3 года назад
Interesting. I guess I will use Fiddler like you did and see what’s going on under the hood of Power Apps and see if there are any differences in the traces when doing a submitform or a patch.Thanks again for the videos! Please keep them coming!
@14zrobot
@14zrobot 3 года назад
Chache invaludation is finicky sometimes. For example, video control works great when video in cache, but sometimes you have to wait for a minute till it loads (10 second video). And after you patch anything or refresh you have to do it again. One way I found is to call Flow to check on sharepoint and report back with values instead of refreshing. Is there a better way?
@ShanesCows
@ShanesCows 3 года назад
I don’t hate it. 😎
@paulkroon
@paulkroon 3 года назад
Maybe a good approach is to catch your patch in a variabel and use this variable om this video control.
@14zrobot
@14zrobot 3 года назад
@@paulkroon if you mean like getting the content with JSON(). Tried that. Powerapps gets really laggy
@stephanebouillon2538
@stephanebouillon2538 3 года назад
Hi Shane, great session. Thanks for sharing. My question is, how can I optimise working with a sharepoint list with many columns, of which I only need a few in my powerapp ?
@ShanesCows
@ShanesCows 3 года назад
You can use ShowColumns function to pull in only the columns you want to see.
@stephanebouillon2538
@stephanebouillon2538 3 года назад
@@ShanesCows Thank you so much. My scenario is that I want to have a gallery with only a few properties, and when I select an Item, I want to fetch and display all the other fields, and potentially update the selected record. Will the showcolumns option block me from accessing the other properties of the list ? As you recommend, I'm not using forms ;)
@dainiuszivelis4153
@dainiuszivelis4153 3 года назад
If few users works with the same data source. In this case i think you need a refresh. Or maybe you know how offten PA refresh data by him self?
@ShanesCows
@ShanesCows 3 года назад
If you have outsides changes, like another user, then you would have to Refresh manually.
@rayromych5534
@rayromych5534 3 года назад
As always - great video! One question - what if I need to add some columns to data source? I presume I would just create a collection with AddColumns - but how do I make sure my collection refreshed when I update data record in the source? Thanks
@ShanesCows
@ShanesCows 3 года назад
If you change the data source from the app Power Apps will know. If you cchange the data source from outside Power Apps you will need to use Refesh unfortunately.
@kearley8792
@kearley8792 2 года назад
When DO I use refresh?
@horaciopedroso9073
@horaciopedroso9073 3 года назад
Hi Shane Young, First of all, congratulations on all your videos !!! I'm using Views from SQL-Server and I'm having difficulty, because sometimes it updates the data, but sometimes it doesn't update - which ends up generating an error. In this case, working with Views from SQL-Server, would it be necessary for me to use Refresh after Patch? or would there be another way to fix it? Thanks
@ShanesCows
@ShanesCows 3 года назад
Yes views almost always need Refresh
@horaciopedroso9073
@horaciopedroso9073 3 года назад
@@ShanesCows Thank you!!!
@subsguts2691
@subsguts2691 2 года назад
Hi Shane and others. I would LOVE to not use the Refresh, however, the following code does not work without the last line, which is the Refresh. This code executes when the user clicks a button in the gallery, which sets "Archived" to true in the data source. Below this code is what Items code looks like. It appears that if the cache is invalidated, it should reload the gallery and not include items that have the Archived equal to true. However, without the refresh (on the button, after the patch) this does not happen, even though the data source is updated. The only difference between the Gallery not displaying the records that have been archived is this one line of code. Would really like to know why from Shane or anyone reading this. Until then my Refresh has to stay 😞 Button Code: Select(Parent); //Updates the delete flag Patch( FeeRequest, ThisItem, {Archived: true} ); //Set to first record Set(VarLastEditID,""); //Without this it does not remove the deleted record from the gallery Reset(RequestGallery); Items Code: If( varStatus = "In Progress" || varStatus = "Submitted", (SortByColumns( Filter( FeeRequest, UserGUID = varUserGUID And Archived = false And Status = varStatus ), "Created", Descending )), SortByColumns( FeeRequest, "Created", Descending ) )
@quadstardesign
@quadstardesign Год назад
Shane, Quick question on the gallery auto refresh. This seams to work great until the gallery items have a search or filter applied from a text input box. Then the auto refresh doesn't work at all. Have you noticed this, and if so, how do you get around it? Edit: It appears that the gallery uses the latest refresh when search is not applied, but uses different data when a search is applied.
@k1lg0re50
@k1lg0re50 11 месяцев назад
Got the same issue here. Gallery with Excel sheet as data source, filtered as this: Filter(Employees, PPE_DONE = "false"). You're right, after lots of investigation it appears that the data retrieved after the cache invalidation come from some remote cache (or can it be local?) that has yet to be updated, while the Excel sheet is updated instantaneously. In other words what I get back is the same as before, and the item on the list that was treated is still visible when it shouldn't. If I trigger a refresh using a timer, it takes on average two minutes for the new data to show up. I tested without a filter and indeed the updated data shows up right away. Even when using the collection approach, ClearCollect behaves exactly the same: the data retrieved are the old data, not the new ones. Again, only after about two minutes will the new data show up using ClearCollect again.
@quadstardesign
@quadstardesign 11 месяцев назад
@k1lg0re50 turns out this is an issue with too many rows being returned and powerapps is defaulted to only return 500 rows. You can't use the default form. You need to look into using collections. It's more work but it will get you what you want.
@k1lg0re50
@k1lg0re50 11 месяцев назад
@@quadstardesign Thanks for replying. That's strange though because I'm in test dev/test phase and my sheet contains about twenty rows. Anyway, I implemented a collection for the list, and one to keep track of what to remove from the list. Ideally it would need more code to remove what has been removed from the remove list from the moment it's not in the refresh any more to avoid a "not found" error but I had enough of this, IfError(Remove(collection, removedCollection), "", ""); does the job fine blocking the error message, even though it's not very elegant...
@JonH232
@JonH232 3 года назад
If only there was a function to invalidate the cache.
@ShanesCows
@ShanesCows 3 года назад
One day. 😎
@Fernanda-uh7iz
@Fernanda-uh7iz 3 года назад
Hi Shane, I was about to put refresh on my app at the start 🤣... i thought it was best since my app is a "live" purchase order status report... is it really a bad idea??
@ShanesCows
@ShanesCows 3 года назад
Yup. 😎
@altino91255268
@altino91255268 3 года назад
Hi Shane, Great video... Could you ask a question? From what I realized when I use a complex type column does he make a separate call to that column? So if I have 5 complex columns, will he make 5 separate calls? Also, you said that the refresh creates a cache just for him and is not used, why does this happen?
@ventureinozaustralia7619
@ventureinozaustralia7619 3 года назад
Nice one Shane, thanks for explaining. Got any vids on my you dislike view forms? Interested to know more. Thanks
@ShanesCows
@ShanesCows 3 года назад
I haven’t made the video yet but is on the list. 🐶 Long story short? View forms do 5% of what edit forms do. Edit forms do 100% of what view forms do. So give me more flexibility
@simonjireson
@simonjireson 3 года назад
As ever, Great video Shane, I have learnt a lot from you over the past 6 months - thank you. I notice that if I use ClearCollect over a sharepoint list the collection does not refresh unless I use the refresh command on the sharepoint list first - which clearly from this video I want to avoid. Am I missing something here? Cheers Si
@simonjireson
@simonjireson 3 года назад
Reading through the comments below, I think this is already answered. If the data is changed outside of the app a refresh will be required. Someone mentioned a dummy patch, would be less overhead I guess..
@ShanesCows
@ShanesCows 3 года назад
You got it right Simon. Me and the team were talking about Dummy patches today for fun. I think it is the least overhead solution.
@davidgraf8012
@davidgraf8012 3 года назад
@@ShanesCows - How do you do a dummy patch? Also, where do I go to sign up for something like your "office hours"? How much does that cost?
@ShanesCows
@ShanesCows 3 года назад
@@davidgraf8012 The dummy patch is something we have debated here at PowerApps911. It looks like you would need to patch an existing record, with some random data, or patch a new record and follow it up with delete. Both options are faster than Refresh in most cases. training.powerapps911.com has different ways to get the monthly office hours. The curated library with office hours for $20 a month is the cheapest option. We also have 1 on 1 options available at www.powerapps91.com
@davidgraf8012
@davidgraf8012 3 года назад
@@ShanesCows - Thank you so much. I'll definitely check it out.
Далее
PowerApps Delegation and the 500 item limit
34:00
Просмотров 112 тыс.
СМАЗАЛ ДВЕРЬ
00:31
Просмотров 252 тыс.
5 Power Apps Performance Tips
22:33
Просмотров 14 тыс.
Why Power Apps Patch function doesn't work properly
16:24
PowerApps List Relationships with SharePoint
25:41
Просмотров 7 тыс.
PowerApps Save Data - Patch, Collect, and ForAll
25:52
Просмотров 244 тыс.
Power Apps StartScreen, OnStart, and Deep Linking fix
20:39
Power Apps Tables vs  Records vs  Fields
26:27
Просмотров 42 тыс.