Your videos have been lifesavers. I was tasked with creating an app at work and I previously had ZERO Power Apps experience. With the help of your videos, I have a working app!
Reza! You just solved the delegation problem with a simplest way ever!!!!!! I couldn’t believe that I can find the solution for delegation issue in a video without even mentioning about this. You save my life!!!!
@@Magayshibeo That should not be the case. The hidden gallery will load data in batches of 100. If you need to apply queries then you should add it to the hidden gallery. The main gallery only references the hidden gallery.
Hi Reza.. I was struggling to achieve pagination in my powerapps gallery for a week now & this video of yours helped me achieve the same in few mins.. you've saved me a lot of work & i learnt a lot from this video.. Thanks a lot. God bless you 🙌🏻
@@chikugerson5291 I have not experienced the mentioned issue and hence not sure what the cause for it could be. I will recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
@@RezaDorrani I figured it out turns out the gallHidden was giving 0 due to my filtering which was incorrect but I fixed it. Now I'm thinking what happens if the gallery indeed has no items from the data source
Last year I was hunting for this- now saviour has come ( little bit late, but good for the next one) Very goooooooood👍👍 Best part is formula description is the cream of the 🎂
Thankyou Reza for excellent article and video on pagination. You are a life saver. Best part which I love is you have clear cut explanation of code and also provide readymade app to use it. My best wishes to you. 🙏
I appreciate your videos and explanations. I will make use of this technique right away. You are clearly knowledgeable and clever. Thank you. I wish I could help you as much as you have helped me--and others. One little thing, perhaps. (I know some may take exception to my mentioning this--not the correctness of what I say, but that I would dare offer a suggestion. So please, accept it, or not, as you wish. I will still learn from you.) The word "pagination" is pronounced like "PAJ INATION" rather than like "PAGE INATION". For what it's worth to you. Offered sincerely.
@@RezaDorrani You are a humble man. Not just smart. An excellent combination in any man but not a common combination, sadly. Seriously, I cannot tell you how much I've learned from you. Ciao!
Oh its been a while and don’t remember much. Video description has link to formulas. Also I did another video whose description has link to download sample app. Check th-cam.com/video/bnC8u3gdWss/w-d-xo.html
Thank you Reza for always creating videos which encounter the challenges in Power Apps. Just a quick question - do you have any video for the data table shown in this video?
Too much of intelligence applied. I got to watch another time :P. Honestly learned so many things here especially with the default property of the hidden gallery. Thanks Reza. Give a thought about sharing your students data :D
Great explanation. I learned a lot from this video thank you. I want to know how to ensure that all data sources are updated successfully when updating multiple data sources at the same time, and cancel as long as any one of them fails.
When you Patch data, you can get a response from the Patch function. Example: Set(result, Patch(...)) result will give you the details. Success or failure.
Hi@@RezaDorrani, I have just implemented your pagination mechanism and it works well but I came across one issue. When I go and edit an item from a gallery and execute SubmitForm(myEditForm) it goes back to my DisplayForm but defaults to the first item on the page I selected an item from rather than the item I selected for editing (I hope it makes sense). Having investigated an issue, the problem seems to be with hiddenGallery.AllItems method under Items property in my visible gallery. When I choose an item from my visible gallery the hidden gallery always points to the top item on the active gallery page. I will try to fix, but if you know a solution on top of your head I would appreciate it :)
@@wojciechjaniszewski9086 I don’t think I have understood the scenario. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Really nice i just implemented it. Just a quick question i have an editable gallery so this means i need to save any changes made to records before i navigate to next gallery page. If i want to make changes after i made corrections to any of gallery pages i need to add the changes to collection and then push the collection to datasource?
Hi Reza, you make something which is so complex seem so simple! From your use of referencing a hidden gallery, I see that it is a better option that utilising a collection, bec the collection is limited by the delegation limit, but the gallery is not. But it still acts as a 'middle man' so that you can use non-delegable formulas on large amounts of data. Have I got it right?
Hi Reza, thank you very much for this video! I just want a basic question related to the Reset button, how did you set it up? and I watched you use the varReset, it was not clear to me how you set up this one...
That is really an excellent video!! A question, is there any way to show loading spinner while filtering data? i am using variable to control the visible of loading image
Hi Reza. Thank You so much for this video. I have a small query and was hoping if you could help. Let's say I'm on page 5 of the results and i search for an item. The search will return a single record and note that i did not press on Return. How do I intelligently navigate the user to page 1 so that he can view that single search result. Any help would be helpful!
@18:18 When I used the default property and updated a record in the gallery, it triggered data to reload. I was wondering is there other way to load the next 100 rows in a gallery without using the default property and manually scroll to the bottom?
This was a very great video Reza! Got to know so many things.. I was having one question, can we filter any people column in that hidden gallery? Thanks again for this video!
The hidden gallery is just like a regular gallery. You can add any filters of your choice. I did a video long back on filtering on people column - th-cam.com/video/tPxE_-DcWkg/w-d-xo.html
Hi there! Thank you so much for this video. I am using an Oracle database and am not aware of how many records are currently available (I’ve been scrolling down and have gotten to 15k but it still doesn’t stop there) Is there any way I can actually display or show the total amount of records?
I have not done any work with Oracle DB and hence not sure what the steps would be. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Thanks for the video, It helped me a lot.. I am getting runtime error saying number divided by zero and I would like to know how are you resetting all the filters.
I have not come across this issue and hence not sure what is the cause for your issue. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
@@RezaDorrani I am getting the same error. Still trying to dig. Everything works otherwise. From running a monitor, it looks to do with the formula behind the "Page # of X Pages" code.
Okay, figured out my issue with "Divide by zero". Not sure if this is the same for the OP, but for me, I was using a modern dropdown control for pagination. If I hardcoded a pagination count, the error went away. So, figured it was something to do with the control. I replaced the modern dropdown with a classic (styled to "look" modern), and the error went away. Brilliant video.
Hi Reza, the tutorial was so helpful. I am new to powerapps and I have this doub is there any way we configure the initial load of items into gallery as currently we can only load and paginate 100 items right. I wanted to have at least load 500 items and paginate through those 500?
Hi, Reza. Your video is amazing! Just want to ask how can the user back to a specific record which not on page 1 of the gallery after they edit it. Thank you!
May be when user navigates to different screen, we store the page number in variable so when user comes back, we can use that variable to default to that specific page.
Hi Reza, thanks for such great content! You are the top man for PowerAPPs. Would it be possible in your system to trigger the next page action automatically when the user scrolls down to the end of the current page?
Thank you so much, Reza, for another amazing tutorial! I have a quick question: I'm working with two sets of data that need to be displayed in two galleries, where one is embedded within the other. Specifically, I want to filter the second dataset based on a specific field from the first dataset. For each record in gallery 1 (which has 700 records), I have approximately 30 records in the embedded gallery 2, a lot. Do you think this approach is achievable using a hidden collection?
I have no clue about this. I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza , thnx for wonderful explanation...my datasource is dataverse n I need to genrate serial no in gallery ...how can we do? I hv used sequence fun but for it we need to give it on gallery item property but my gallery is already connected with dataverse table . thnx
In this video, I have showcased using 2 galleries. 1st gallery which is the main gallery that is connected to data source & 2nd is the gallery that is displayed to the user. You would need to use the sequence function and generate the sequence. Check out this post. May be it helps - powerusers.microsoft.com/t5/Building-Power-Apps/Add-Row-Number-to-Gallery-in-PowerApps/td-p/430856
Its been a while since I did this video :) On click of reset button, I set resetvar to true which triggers the reset of all the filter controls and reloads the hidden gallery.
@@RezaDorrani Thank you! Seems working fine now. Just to confirm if I got it correctly, I set Reset of dropdown as varReset, then OnSelect of Reset Button is Set(varReset, true). Is that correct?
Hi Reza, the video is amazing with crystal clear explanation👌👌 . I only have one challenge when filtering the data with pagination data selected. For example, when we launch on to the home screen the data will be displayed with the set of records from the number that we have in the pagination dropdown. Consider that we have the pagination number as 5. When we navigate to the next page, the next set of records will get displayed from (i.e) 6-10. Now, my challenge is that when we navigate to the page 2 and change the pagination from 5 to 10 in the second page, then instead of listing the next 10 set of records (i.e) from 6-15 items it loads the data which falls from 11-20. Can you give me some inputs that can help to achieve my requirement to display items that are from 6-15 ? Thanks in advance.
When pagination size changes, then reset the hidden gallery. Set(varReset, false);Set(varReset, true) And use varReset as a filter criteria in hidden gallery.
@@valmikiarjun782 The previous comment was the simplest explanation I could give. I would recommend posting your query on forums at powerusers.microsoft.com
Hi Reza, thank you so much for this video, amazing!! I've a problem, my hidden gallery only show me the first 100 records, how can I collect all records in memory
The idea of the video is that the hidden gallery will show 100 records (delegation) and as the move navigates through the set of records in the main gallery, the hidden gallery keeps loading data in batches of 100. Check the whole video in action.
As usual another great video Reza! Thanks for sharing all these practical workarounds! Huge props for the logic applied for the pagination and totally gave me a different understanding about delegation in powerapps... Just a comment though, the logic at th-cam.com/video/aKsNOsGj72A/w-d-xo.html regarding the display of the iconLast should just be a "less than" operator instead of "less than or equals" as per my own testing...
Excellent tutorial Reza and thanks for sharing. I suppose that only galleries handles automatically blocks of 100 rows and not collections (which is not a visual object).
@@RezaDorrani Yes, but galleries should even load in batches of 100 if no delegable and have no functions or filters, because in that case, there's nothing to delegate to the data source.
@@RezaDorrani Yes, I meant "non-delegable data source", so the query in that case is delegable because it has no criteria or filters and can load infinite rows in batches of 100 for example from Fin & Ops, even if it is a non-delegable data source. I think that is it important to distinguish between delegable data source and delegable functions.
Hello @Reza, We followed same steps for our gallery, which list item count is more than 28000, so for that how we can achieve this pagination functionality? It will work only upto 100 records with search.
Hi reza when I am patching any item from the paginated gallery, it goes back to the first selected item in gallery by default since we have If(drpPaginationSize.Selected.Value * varPageNumber >= CountRows(Self.AllItems),Last(Self.AllItems)) for the default for hidden gallery How can I make sure that the gallery default selection remains the same item after patching/editing a particular item from the gallery? I was thinking to store the ID value in a variable and checking if the variable is empty then go to first item from that page as your code does for the default but when it the variable is not empty it should select the id from the variable but its not working do you have any other suggestions?
Hi Reza, thanks for providing these fantastic videos. I was wondering if you have ever had a case of combining GroupBy / Nested Galleries with pagination to create printable reports?
@@RezaDorrani thanks Reza, I looked through that and found it very useful for some other parts of various apps I've created. The reason behind the pagination request was because I've got a Time Attendance app that integrates with a lot of other things, and thought it would be nice to have a nested report (Staff Name and various calculations in the 'top' gallery, then all the individual entries for that user as a sub gallery - which I can do, but I can't get it to paginate dynamically - as I have done with single galleries (after viewing your other videos!). Not too important, but I'm sure it would be useful for others too - if I find a way of doing it, I'll drop you a message.
Hello, Reza! Thanks for share this tutorial. Please, Can you help me with the following question. Do you think there are problems if we use a Sharepoint list with around 25000 records? Thanks a lot!
Hello Reza, very good explanation Would you help us to create a daily audit checklist app in power apps? The audit checklist has 30 different check points
If for example, I have a gallery with employee records and it contains employee division, as well as other fields like systems, roles, etc…and every division has unique roles (so there will be duplicates since there are many different roles for each division) is there anyway I can get rid of the duplicates and like group them so that my gallery only shows the divisions (so that someone can choose it in the first screen) and then another screen will appear will all the info of the division chosen?
I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza, this certainly solved my use case! Thanks for sharing this! One question, is it possible to show the number of total pages and total returned rows instead of using the + sign? Thank you.
Thank you for your tutorial of PA pagination, but i have a question? is it possible to create page pagination with filter embeded to the gallery instead of create seperate input box for filter.
@@RezaDorrani Thank you for your reply and sorry for my misused sentences The issue i'm facing is i'm trying to show my filtered sharepoint list by table value _on start_ with this formula " Filter(, Title in )" However it returns 0 matching records because of delegation due to my SP list contains over 7000 records . even though there is matching value on DB table and i'm trying to reuse this formula on different SP list with record below 100 it shows matching value on PowerApps. so it is possible to use pagination to minimalize filtered records on start? if not is there any possible solution to filter SPlist on start? Thank you.
@@bat_mobile7545 I am not so sure about that. Something that I would have to try. I will recommend to post your query with screenshots on the forums at powerusers.microsoft.com
Hi Reza this is great tutorial, congratulions! I have one question how we can export in an excel all the elements inside on a paged gallery, with a flow even if they are in different pages? thank you very much.
Since delegation would be a challenge, not all data would be loaded in memory. I would recommend to export data to excel by calling flow and let flow do the query. Check th-cam.com/video/tQCBWMR7T64/w-d-xo.html
HI Reza, Superb Explanation. I implemented the same and working perfect. I have a requirement to Connect different lists (with same columns) to the same paginated gallery. Can you help me on the same. Thanks in advance.
I will have to look at your App in action to provide any guidance. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi Reza, what an amazing content! I’m also working on the pagination but in case I want to view the last 5 previous page records what will be the change I’ll have to introduce any suggestions?
Not sure why you would not want user to paginate to those records instead of updating logic to show 5 previous page records. This is not something I have tried and would need to try it out to know the steps. I recommend posting your query on forums in case someone has done something similar powerusers.microsoft.com
Hi Reza, As always impressed with your clean and detailed explanation with all similar examples which makes easier for us. Thank you. I came across a question. I would like to have a search bar on the top to display the record I want. But the record I want is not in the first batch load. Any thoughts how I would get this functionality. Thank you so much again :)
Hello Reza.is there a way can we change the count which gallery is loading by default after optimisation. In this video it’s 100. I understand it’s oob just want to check if we can change it?
Gallery has a property called Transition. It gives 2 hover effect options Push & Pop. Check my gallery design videos - th-cam.com/video/-xSjy_rwQF8/w-d-xo.html & th-cam.com/video/bnC8u3gdWss/w-d-xo.html
@@remorse7405 check for hover properties on control. I will also recommend posting your query with screenshots on the forums at powerusers.microsoft.com
Thanks for the vedio Reza.I tried implementing the same,but my gallery is showing only 100 items though i have 8000 plus records in my DB.Can you please help on this.
Gallery loads data in batches of 100 (delegable gallery - as shown in video). To load more data, key is to use concept of hidden gallery and setting its default value. Shown at 18:00 in video.
i have implemented the same way in the hidden gallery and filter queries are working fine , when the page navigation reaches to 10th page it is getting disabled and not loadind next set of records
@@chinnu525 10 page meaning you have loaded 1000 records. Make sure your hidden gallery is not running into delegation issues. You filter query has to be delegable. If it is delegable and still not loading then it means your default formula set for hidden gallery may not be right. I will have to look at your App in action to provide further guidance. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
hi reza, thank you for this video... i'm trying to implement this on my app but the hidden gallery won't show more than 100 records.. It only shows more than 100 records if i scroll it... what should i do to make it work?
The video has the logic that scrolls the hidden gallery by design. Not sure why its not working in your case. I would recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com/
Could not have better than this, simply amazing. Understood every single point. But I have a question, If I am trying to search anything in the search box on Page 2/3/4, results are appearing in Page number 1 and I need to navigate to page 1 to see results. What we want is; Result should appear in the current page. How can I achieve that? Please help !!!
There are 2 galleries in play here. One which is hidden - where all searching and filtering logic should be applied to. The one which is visible is only demonstrating the info in hidden gallery. So when you search and filter on hidden gallery, the visible gallery will show the filter results (gallery is reloaded with filtered data) and results will start from page 1 itself.
@@fakharahmedkhan5157 Gallery reloads with new data. So keeping user on current page does not add value. User should see reloaded data since a query was performed against the data source.
This is very helpful, but I'm having a problem. I am able to use my hidden gallery's default property to automatically set the selected item to the last item in the gallery (as shown in the video). But this does not trigger the gallery to load additional items from SharePoint. In troubleshooting, I made my hidden gallery visible and scrolled to the bottom of it. Even that did not trigger the gallery to load additional items. Is there a setting that controls whether the gallery loads additional items once the user accesses the last item?
I resolved this issue. The problem turned out to be in the Items property of the hidden gallery. Despite using delegable functions and not getting any delegation warnings, I was encountering a delegation issue because the SortByColumns() was inside the Filter(). I resolved this putting the Filter() inside the SortByColumns().
Hey Reza, There is an issui I realized. In DropDown of number of pagination when you choose 5 for exemple and you are in the last number of pages, if you change the dropDown to a greater number of pages (last one) the first number of pages in the label will be greater then the last one. I added Set(varpagenation;1) in the onchange of the dropdown.I dont know if I made me clear. Sorry, I dont speak inglish very much.
I did not understand the question. Video description has link to blog post with formulas. You may want to post your issue with screenshots on the forums at powerusers.microsoft.com/
@RezaDorrani, Hi Reza... Thank you so much for this video. I am just thinking of creating a component for this pagination. I was wondering why this was not a component. Now i understand that datasources can't be passed to Components... 😢 Any workaround do you have??? Thank you so much for the wonderful video... ❤🙏 Being a developer, just using your videos
Hi Reza, no one can better explain this topic like this. Quick question here. we create hidden gallery to replace delegation issue. I saw when you add hidden label for Count Rows you received 300 as output, in my case I just add data source [contain 400 records] as item of gallery. and Count Rows I received 100. Should be okay or Output should be 400?
@@RezaDorrani Thanks for your response. Can you do one favor please? In my paginated gallery there is one checkbox field, and I put one checkbox outside the gallery called CheckALL. So when I click on CheckALL. It checks all the checkbox. But I want to check the record based on pagination. How can we achieve that?
@@bansaripandya2635 I will have to try it out to let you know the steps. I will recommend you post your query on the forums at powerusers.microsoft.com
Crystal clear explanation 👌. With all best practices. Learned a lot Reza.
Thank you
Your videos have been lifesavers. I was tasked with creating an app at work and I previously had ZERO Power Apps experience. With the help of your videos, I have a working app!
So happy to hear that! Thank You for watching & learning from the videos.
Reza! You just solved the delegation problem with a simplest way ever!!!!!! I couldn’t believe that I can find the solution for delegation issue in a video without even mentioning about this. You save my life!!!!
Glad to know the video is helpful. Thank you for watching.
@@RezaDorrani Just realize that the second gallery only can filter the first 100 items of the hidden gallery :(
@@Magayshibeo That should not be the case. The hidden gallery will load data in batches of 100. If you need to apply queries then you should add it to the hidden gallery. The main gallery only references the hidden gallery.
Hi Reza.. I was struggling to achieve pagination in my powerapps gallery for a week now & this video of yours helped me achieve the same in few mins.. you've saved me a lot of work & i learnt a lot from this video.. Thanks a lot. God bless you 🙌🏻
You are most welcome and thanks so much for watching
brilliant video, was confused initially but went through it again after going through all the gallery playlist of yours and it made it crystal clear
Great to hear!
Broooo You are such a saviour !!! I had no knowledge of powerapps and by this video I was able to implement pagination with ease .
Thanks
Glad it helped!
You live up to the idea of "sharing is caring". Thanks for a great video.
Thank you for your kind words
Then again, Reza saves the day! You are awesome! Thanks for the great work and education!
My pleasure!
I love all your video and blogs? Clear simple and understandable for everyone. Thanks Reza.
My pleasure!
Super clever solution Reza. Can’t wait to try it out. Thank you for all of your videos.
Thank you Teresa. Let me know how it goes when you try it out.
Thank you Reza. Your videos are super! And your blog post is super also. Thank you!
Glad you like them!
I feel like a kid again that was just handed a very beautiful gift by Santa after watching this. Thank you so much Reza and Happy New Year!
Thank you 😊
Happy New Year to you as well
That was brilliant. Using the gallery's default property to trigger the next 100 record fetch was 100 IQ stuff🔥.
Thank you
@@RezaDorrani What code did you use in the default property to trigger the next 100 record fetch. Please help
@@shalom9234 Please check video again. I select last item of hidden gallery. Its shown in video.
Amazing Reza. you are the best ever. You save my life every single day. Thank you a lot
wow! thanks
This is exactly the solution I was looking for my use case. Thank you very much Reza for taking time to explain this 🙌🏼
Glad it was helpful!
The solution it self and the way you're explaining the logic is just awesome! Thank you, Reza!
Thank you for your kind words
@@RezaDorrani Hi I am getting division by zero error on "Page " & varPageNumber & " of " & If(
Mod(
CountRows(galHidden.AllItems),
100
) = 0,
RoundUp( CountRows(galHidden.AllItems) / drpPaginationSize.SelectedText.Value ,0) & "+ pages",
RoundUp( CountRows(galHidden.AllItems) / drpPaginationSize.SelectedText.Value,0) & " page(s)"
)
@@chikugerson5291 I have not experienced the mentioned issue and hence not sure what the cause for it could be.
I will recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
@@RezaDorrani I figured it out turns out the gallHidden was giving 0 due to my filtering which was incorrect but I fixed it. Now I'm thinking what happens if the gallery indeed has no items from the data source
@@chikugerson5291 if hidden gallery has no items, then main gallery also wont show any
Shared the pagination in a simplest and yet effective manner.Kudos keep up the good work.😊
Thank You!
Last year I was hunting for this- now saviour has come ( little bit late, but good for the next one)
Very goooooooood👍👍
Best part is formula description is the cream of the 🎂
Thank you and glad to know the video is useful
Thankyou Reza for excellent article and video on pagination. You are a life saver. Best part which I love is you have clear cut explanation of code and also provide readymade app to use it. My best wishes to you. 🙏
You're most welcome and thank you for the feedback.
Ji Reza, very clear explanation. I just became aware of the use of default function of a Gallery. Thanks. 👍 Gr. Lex
Thank you Sir
superb explaination. now I understood how pagination works. Thanks for sharing.
Glad it was helpful.
Thanks!
Thank You!
I am currently working on such business problem and this video was so helpful ! Thanks Reza! Very well explained and demonstrated ! :)
Great to hear!
Thank You Reza sir, Very well explained!
Thanks for watching
Another fabulous topic.. Really helpful.. Thanks for sharing..
You are so welcome!
Awsome solution Reza, great explanation.
Thank you! Cheers!
Thank for this video n lessons, you r great teacher.
You are very welcome
Simply stunning . Excellent explanation 👌
Thank you so much
Excellent video Reza! Thanks
Glad you enjoyed it
Good explanation...had developed pagination earlier but got some best practice tips ... thanks and keep it up
Glad to hear that
Till now I found the best channel on TH-cam for Power Platform...Thank you Reza!
Wow, thanks!
Great!!.. Works like a charm. Thanks a lot
Great to hear!
But found that we cannot apply sorting to that hidden gallery with a sorting column as a parameter. It shows delegation warning
@@prajwalkbhandary4995 There are ways to make sort columns delegable. Check th-cam.com/video/6KlI1iZ_KD0/w-d-xo.html
Yeah. Understood. It's a long way actually. Anyway Thanks again.
Great solution and video! Thanks heaps.
Most welcome Krutika
I appreciate your videos and explanations. I will make use of this technique right away. You are clearly knowledgeable and clever. Thank you. I wish I could help you as much as you have helped me--and others. One little thing, perhaps. (I know some may take exception to my mentioning this--not the correctness of what I say, but that I would dare offer a suggestion. So please, accept it, or not, as you wish. I will still learn from you.) The word "pagination" is pronounced like "PAJ INATION" rather than like "PAGE INATION". For what it's worth to you. Offered sincerely.
Thank you for your kind words. I welcome feedback of any kind. Thank you for pointing that out. I will make sure I pronounce it right the next time.
@@RezaDorrani You are a humble man. Not just smart. An excellent combination in any man but not a common combination, sadly. Seriously, I cannot tell you how much I've learned from you. Ciao!
@@pasfoundation4927 Thank you and appreciate all your kind words.
Beautifully explained
Thank You!
Great Video. Thanks Reza
You are most welcome
Nice video Reza. Just to check where are you implementing your varReset which in the galhidden?
Oh its been a while and don’t remember much. Video description has link to formulas. Also I did another video whose description has link to download sample app. Check th-cam.com/video/bnC8u3gdWss/w-d-xo.html
@@RezaDorrani thanks.
Nice video. Thanks Reza
Your most welcome
Thank you Reza for always creating videos which encounter the challenges in Power Apps. Just a quick question - do you have any video for the data table shown in this video?
Thanks so much.
I do have a video on gallery designs in which I shared the App which has that table like experience.
Too much of intelligence applied. I got to watch another time :P. Honestly learned so many things here especially with the default property of the hidden gallery. Thanks Reza. Give a thought about sharing your students data :D
Thanks for the amazing feedback Ramesh.
Awesome content.. Thanks Reza
Glad you enjoyed it
This is awsum!!!!
Thanks
Great explanation. I learned a lot from this video thank you.
I want to know how to ensure that all data sources are updated successfully when updating multiple data sources at the same time, and cancel as long as any one of them fails.
When you Patch data, you can get a response from the Patch function.
Example: Set(result, Patch(...))
result will give you the details. Success or failure.
@@RezaDorrani Thanks for your reply
Great Stuff!!
Thanks so much
Hi@@RezaDorrani, I have just implemented your pagination mechanism and it works well but I came across one issue. When I go and edit an item from a gallery and execute SubmitForm(myEditForm) it goes back to my DisplayForm but defaults to the first item on the page I selected an item from rather than the item I selected for editing (I hope it makes sense). Having investigated an issue, the problem seems to be with hiddenGallery.AllItems method under Items property in my visible gallery. When I choose an item from my visible gallery the hidden gallery always points to the top item on the active gallery page. I will try to fix, but if you know a solution on top of your head I would appreciate it :)
@@wojciechjaniszewski9086 I don’t think I have understood the scenario. I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Really nice i just implemented it. Just a quick question i have an editable gallery so this means i need to save any changes made to records before i navigate to next gallery page. If i want to make changes after i made corrections to any of gallery pages i need to add the changes to collection and then push the collection to datasource?
I would guess YES. I would have to try it out with editable gallery scenario to know more.
Hi Reza, you make something which is so complex seem so simple! From your use of referencing a hidden gallery, I see that it is a better option that utilising a collection, bec the collection is limited by the delegation limit, but the gallery is not. But it still acts as a 'middle man' so that you can use non-delegable formulas on large amounts of data. Have I got it right?
You are spot on Ryan! I wish I had used this as my video description :)
You are amazing.
Wow, thank you!
Thanks mate 👍👍
Any time!
Hi Reza, very clear explanation. Keep it up, could you please start videos on SPFx, it will be very helpful us.
I plan to keep my focus around the Power Platform. I have done very little work with SPFx.
Save my life Reza 😊
👍
thanks Reza
Most welcome!
9:05 hello reza can you explain from where you have taken the variable varReset in the hidden gallery
I did this video years ago and do not remember where and when in video I showed it. Please check the entire video.
@@RezaDorrani you havent shown the varReset in the video,else everything you shared in the video completely
@@vaishnav7679 Probably on click of reset button I had set that variable to false and then true. Simply Toggled state of variable.
@@RezaDorrani thank you for your help,your videos are really great..!!
Hi Reza, thank you very much for this video! I just want a basic question related to the Reset button, how did you set it up? and I watched you use the varReset, it was not clear to me how you set up this one...
I simply change the variable value which in turn resets the gallery as gallery filter condition has that variable as a condition
ok great, which specific value do you change in the variable?@@RezaDorrani
@@stephaniacastillo4487 I simply set that boolean variable to false and then true
That is really an excellent video!! A question, is there any way to show loading spinner while filtering data? i am using variable to control the visible of loading image
Check powerusers.microsoft.com/t5/Building-Power-Apps/Loading-Spinner-while-gallery-data-items-are-retrieved/td-p/683536
Hi Reza. Thank You so much for this video. I have a small query and was hoping if you could help. Let's say I'm on page 5 of the results and i search for an item. The search will return a single record and note that i did not press on Return. How do I intelligently navigate the user to page 1 so that he can view that single search result. Any help would be helpful!
When user presses on button to search or filter on, you can always set the pagination index to 1.
@18:18 When I used the default property and updated a record in the gallery, it triggered data to reload. I was wondering is there other way to load the next 100 rows in a gallery without using the default property and manually scroll to the bottom?
There is no way to load the next 100 rows inside a gallery (delegable) without manually scrolling to bottom or setting default.
This was a very great video Reza! Got to know so many things..
I was having one question, can we filter any people column in that hidden gallery?
Thanks again for this video!
The hidden gallery is just like a regular gallery. You can add any filters of your choice.
I did a video long back on filtering on people column - th-cam.com/video/tPxE_-DcWkg/w-d-xo.html
Hi there! Thank you so much for this video. I am using an Oracle database and am not aware of how many records are currently available (I’ve been scrolling down and have gotten to 15k but it still doesn’t stop there) Is there any way I can actually display or show the total amount of records?
I have not done any work with Oracle DB and hence not sure what the steps would be. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Thanks for the video, It helped me a lot.. I am getting runtime error saying number divided by zero and I would like to know how are you resetting all the filters.
I have not come across this issue and hence not sure what is the cause for your issue. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
@@RezaDorrani I am getting the same error. Still trying to dig. Everything works otherwise. From running a monitor, it looks to do with the formula behind the "Page # of X Pages" code.
Okay, figured out my issue with "Divide by zero". Not sure if this is the same for the OP, but for me, I was using a modern dropdown control for pagination. If I hardcoded a pagination count, the error went away. So, figured it was something to do with the control. I replaced the modern dropdown with a classic (styled to "look" modern), and the error went away.
Brilliant video.
Hi Reza, the tutorial was so helpful. I am new to powerapps and I have this doub is there any way we configure the initial load of items into gallery as currently we can only load and paginate 100 items right. I wanted to have at least load 500 items and paginate through those 500?
You should ideally not load more than 100. 100 is optimized loading.
I don't seen many users scrolling through 500 records and then paginating.
Hi, Reza. Your video is amazing! Just want to ask how can the user back to a specific record which not on page 1 of the gallery after they edit it. Thank you!
May be when user navigates to different screen, we store the page number in variable so when user comes back, we can use that variable to default to that specific page.
Hi Reza, thanks for such great content! You are the top man for PowerAPPs.
Would it be possible in your system to trigger the next page action automatically when the user scrolls down to the end of the current page?
Thanks for your kind words.
I dont think there is any action that can capture scrolling down to last item. Not aware of anything for it.
Thank you so much, Reza, for another amazing tutorial! I have a quick question: I'm working with two sets of data that need to be displayed in two galleries, where one is embedded within the other. Specifically, I want to filter the second dataset based on a specific field from the first dataset. For each record in gallery 1 (which has 700 records), I have approximately 30 records in the embedded gallery 2, a lot. Do you think this approach is achievable using a hidden collection?
I have no clue about this. I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza , thnx for wonderful explanation...my datasource is dataverse n I need to genrate serial no in gallery ...how can we do? I hv used sequence fun but for it we need to give it on gallery item property but my gallery is already connected with dataverse table . thnx
In this video, I have showcased using 2 galleries. 1st gallery which is the main gallery that is connected to data source & 2nd is the gallery that is displayed to the user. You would need to use the sequence function and generate the sequence. Check out this post. May be it helps - powerusers.microsoft.com/t5/Building-Power-Apps/Add-Row-Number-to-Gallery-in-PowerApps/td-p/430856
Awesome.....
Thank you! Cheers!
As always, awesome video Reza! :-)
How did you do the varReset?
Its been a while since I did this video :) On click of reset button, I set resetvar to true which triggers the reset of all the filter controls and reloads the hidden gallery.
@@RezaDorrani Thank you! Seems working fine now. Just to confirm if I got it correctly, I set Reset of dropdown as varReset, then OnSelect of Reset Button is Set(varReset, true). Is that correct?
@@marlonjhonmonsanto5554 Form what I remember, Yes.
@@RezaDorrani Thank you!
Hi Reza, the video is amazing with crystal clear explanation👌👌 . I only have one challenge when filtering the data with pagination data selected.
For example, when we launch on to the home screen the data will be displayed with the set of records from the number that we have in the pagination dropdown. Consider that we have the pagination number as 5.
When we navigate to the next page, the next set of records will get displayed from (i.e) 6-10.
Now, my challenge is that when we navigate to the page 2 and change the pagination from 5 to 10 in the second page, then instead of listing the next 10 set of records (i.e) from 6-15 items it loads the data which falls from 11-20. Can you give me some inputs that can help to achieve my requirement to display items that are from 6-15 ?
Thanks in advance.
When pagination size changes, then reset the hidden gallery. Set(varReset, false);Set(varReset, true)
And use varReset as a filter criteria in hidden gallery.
Can you please elaborate how to use the condition ?
@@valmikiarjun782 The previous comment was the simplest explanation I could give. I would recommend posting your query on forums at powerusers.microsoft.com
very helpful
Glad to hear that
Hi Reza, thank you so much for this video, amazing!! I've a problem, my hidden gallery only show me the first 100 records, how can I collect all records in memory
The idea of the video is that the hidden gallery will show 100 records (delegation) and as the move navigates through the set of records in the main gallery, the hidden gallery keeps loading data in batches of 100.
Check the whole video in action.
As usual another great video Reza! Thanks for sharing all these practical workarounds! Huge props for the logic applied for the pagination and totally gave me a different understanding about delegation in powerapps... Just a comment though, the logic at th-cam.com/video/aKsNOsGj72A/w-d-xo.html regarding the display of the iconLast should just be a "less than" operator instead of "less than or equals" as per my own testing...
Glad it was helpful! And you are right, works with just the less than operator :)
Excellent tutorial Reza and thanks for sharing. I suppose that only galleries handles automatically blocks of 100 rows and not collections (which is not a visual object).
That is correct. Galleries that are delegable will load data in batches of 100 (optimized loading). Collections are local memory that's held in App.
@@RezaDorrani Yes, but galleries should even load in batches of 100 if no delegable and have no functions or filters, because in that case, there's nothing to delegate to the data source.
@@ricci.hidalgo In that case, its still considered a query with no criteria and it is delegable. So it will load data in batches of 100.
@@RezaDorrani Yes, I meant "non-delegable data source", so the query in that case is delegable because it has no criteria or filters and can load infinite rows in batches of 100 for example from Fin & Ops, even if it is a non-delegable data source. I think that is it important to distinguish between delegable data source and delegable functions.
@@ricci.hidalgo Correct.
thank you so much
You're welcome!
Hello @Reza, We followed same steps for our gallery, which list item count is more than 28000, so for that how we can achieve this pagination functionality? It will work only upto 100 records with search.
It should work with any list size. I dont see any user paginating through 28000 items though.
Hi reza
when I am patching any item from the paginated gallery, it goes back to the first selected item in gallery by default since we have If(drpPaginationSize.Selected.Value * varPageNumber >= CountRows(Self.AllItems),Last(Self.AllItems)) for the default for hidden gallery
How can I make sure that the gallery default selection remains the same item after patching/editing a particular item from the gallery?
I was thinking to store the ID value in a variable and checking if the variable is empty then go to first item from that page as your code does for the default but when it the variable is not empty it should select the id from the variable
but its not working
do you have any other suggestions?
Im not sure of how to do that. Something I would have to revisit and try.
Hi Reza, thanks for providing these fantastic videos. I was wondering if you have ever had a case of combining GroupBy / Nested Galleries with pagination to create printable reports?
I have not come across this scenario. I just did a video on nested galleries though - th-cam.com/video/25_bdexevGk/w-d-xo.html
@@RezaDorrani thanks Reza, I looked through that and found it very useful for some other parts of various apps I've created. The reason behind the pagination request was because I've got a Time Attendance app that integrates with a lot of other things, and thought it would be nice to have a nested report (Staff Name and various calculations in the 'top' gallery, then all the individual entries for that user as a sub gallery - which I can do, but I can't get it to paginate dynamically - as I have done with single galleries (after viewing your other videos!). Not too important, but I'm sure it would be useful for others too - if I find a way of doing it, I'll drop you a message.
@@iansanders1075 Give a try. Let me know if you are able to achieve it.
Hello, Reza! Thanks for share this tutorial.
Please, Can you help me with the following question.
Do you think there are problems if we use a Sharepoint list with around 25000 records?
Thanks a lot!
As long as delegation is handled, then answer is Yes.
@@RezaDorrani Thanks for your answer 😀
Hello Reza, very good explanation
Would you help us to create a daily audit checklist app in power apps? The audit checklist has 30 different check points
If you need help with issues then post your query at powerusers.microsoft.com/
Looks like you need consulting help.
If I am using two lists do you think I could bring in two invisible galleries and combine them in my gallery for the user?
I’m not sure as that is not a scenario I have tried
@@RezaDorrani this is a game changer either way!
If for example, I have a gallery with employee records and it contains employee division, as well as other fields like systems, roles, etc…and every division has unique roles (so there will be duplicates since there are many different roles for each division) is there anyway I can get rid of the duplicates and like group them so that my gallery only shows the divisions (so that someone can choose it in the first screen) and then another screen will appear will all the info of the division chosen?
I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza, this certainly solved my use case! Thanks for sharing this! One question, is it possible to show the number of total pages and total returned rows instead of using the + sign? Thank you.
CountRows is not a delegable query, so it will not give accurate results. Hence, I have avoided it in video.
@@RezaDorrani does that mean that there is not any way to get the total count of data other than using Power Automate?
@@limychelseafc Not without running into delegation warnings.
Thank you for your tutorial of PA pagination, but i have a question? is it possible to create page pagination with filter embeded to the gallery instead of create seperate input box for filter.
I did not understand the question about filter embedded to gallery.
@@RezaDorrani Thank you for your reply and sorry for my misused sentences
The issue i'm facing is i'm trying to show my filtered sharepoint list by table value _on start_ with this formula
" Filter(, Title in )"
However it returns 0 matching records because of delegation due to my SP list contains over 7000 records .
even though there is matching value on DB table and i'm trying to reuse this formula on different SP list with record below 100 it shows matching value on PowerApps.
so it is possible to use pagination to minimalize filtered records on start? if not is there any possible solution to filter SPlist on start? Thank you.
@@bat_mobile7545 I am not so sure about that. Something that I would have to try.
I will recommend to post your query with screenshots on the forums at powerusers.microsoft.com
Hey Reza , can you explain the significance of Reset button and what code is there behind that logic?
Reset button is to reset the filters on the top to their default values.
Hi Reza this is great tutorial, congratulions!
I have one question how we can export in an excel all the elements inside on a paged gallery, with a flow even if they are in different pages? thank you very much.
Since delegation would be a challenge, not all data would be loaded in memory. I would recommend to export data to excel by calling flow and let flow do the query.
Check th-cam.com/video/tQCBWMR7T64/w-d-xo.html
HELLO, I have written you, by all the comunication neting
Hi Reza,
What is formula for reset button
On select property bcoz u used varReset variable
Here is the sample App - github.com/rdorrani/PowerApps/blob/master/PaginatedGallery_20210201175854.zip
Download it and check the code please.
HI Reza, Superb Explanation. I implemented the same and working perfect. I have a requirement to Connect different lists (with same columns) to the same paginated gallery. Can you help me on the same. Thanks in advance.
I will have to try our your use case to provide any guidance. I will recommend you check on the forums at powerusers.microsoft.com
@@RezaDorrani Thanks for you Response
Very helpful video. I have merged pagination in editable grid but when I search or moving to next, whatever we have done changes is lost.
I will have to look at your App in action to provide any guidance. I would recommend you post your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi Reza, what an amazing content! I’m also working on the pagination but in case I want to view the last 5 previous page records what will be the change I’ll have to introduce any suggestions?
Not sure why you would not want user to paginate to those records instead of updating logic to show 5 previous page records. This is not something I have tried and would need to try it out to know the steps. I recommend posting your query on forums in case someone has done something similar
powerusers.microsoft.com
Hi Reza,
As always impressed with your clean and detailed explanation with all similar examples which makes easier for us. Thank you. I came across a question. I would like to have a search bar on the top to display the record I want. But the record I want is not in the first batch load. Any thoughts how I would get this functionality.
Thank you so much again :)
You are most welcome!
The search bar should perform searching on the hidden gallery which loads the paginated gallery.
@@RezaDorrani Yes, Is there any way that we can search for an item that is not in the loading batch? Thanks again
@@thirumaleshm2137 Not that Im aware of
Hello Reza.is there a way can we change the count which gallery is loading by default after optimisation. In this video it’s 100. I understand it’s oob just want to check if we can change it?
Cannot be changed
hi reza, how did you manage to create hovering effect for your gallery? do you have a tutorial on how did you create this whole page?
Gallery has a property called Transition. It gives 2 hover effect options Push & Pop.
Check my gallery design videos - th-cam.com/video/-xSjy_rwQF8/w-d-xo.html & th-cam.com/video/bnC8u3gdWss/w-d-xo.html
@@RezaDorrani thanks! i manage to create the hovering but im having trouble figuring out how to add color to the hovered item when hovering
what does your lblStyle do reza?
@@remorse7405 Its a label that displays the text "Style" in filter. Has nothing to do with App styling.
@@remorse7405 check for hover properties on control. I will also recommend posting your query with screenshots on the forums at powerusers.microsoft.com
Thanks for the vedio Reza.I tried implementing the same,but my gallery is showing only 100 items though i have 8000 plus records in my DB.Can you please help on this.
Gallery loads data in batches of 100 (delegable gallery - as shown in video).
To load more data, key is to use concept of hidden gallery and setting its default value. Shown at 18:00 in video.
i have implemented the same way in the hidden gallery and filter queries are working fine , when the page navigation reaches to 10th page it is getting disabled and not loadind next set of records
@@chinnu525 10 page meaning you have loaded 1000 records. Make sure your hidden gallery is not running into delegation issues. You filter query has to be delegable.
If it is delegable and still not loading then it means your default formula set for hidden gallery may not be right.
I will have to look at your App in action to provide further guidance.
I would recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Thanks for the prompt help Reza.Yes I missed the default value.
Hi Reza, with lookup and addColumns, is it possible to define the pagination as well? Thank you.
Should be possible
hi reza, thank you for this video... i'm trying to implement this on my app but the hidden gallery won't show more than 100 records.. It only shows more than 100 records if i scroll it... what should i do to make it work?
The video has the logic that scrolls the hidden gallery by design. Not sure why its not working in your case. I would recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com/
Could not have better than this, simply amazing. Understood every single point. But I have a question, If I am trying to search anything in the search box on Page 2/3/4, results are appearing in Page number 1 and I need to navigate to page 1 to see results. What we want is; Result should appear in the current page. How can I achieve that?
Please help !!!
There are 2 galleries in play here. One which is hidden - where all searching and filtering logic should be applied to.
The one which is visible is only demonstrating the info in hidden gallery.
So when you search and filter on hidden gallery, the visible gallery will show the filter results (gallery is reloaded with filtered data) and results will start from page 1 itself.
@@RezaDorrani So there is no way we can show results on the current page.(Page 2,3 or 4)?
@@fakharahmedkhan5157 Gallery reloads with new data. So keeping user on current page does not add value. User should see reloaded data since a query was performed against the data source.
@@RezaDorrani Understood, you are a life saver brother. God bless you 😃
This is very helpful, but I'm having a problem. I am able to use my hidden gallery's default property to automatically set the selected item to the last item in the gallery (as shown in the video). But this does not trigger the gallery to load additional items from SharePoint. In troubleshooting, I made my hidden gallery visible and scrolled to the bottom of it. Even that did not trigger the gallery to load additional items. Is there a setting that controls whether the gallery loads additional items once the user accesses the last item?
I resolved this issue. The problem turned out to be in the Items property of the hidden gallery. Despite using delegable functions and not getting any delegation warnings, I was encountering a delegation issue because the SortByColumns() was inside the Filter(). I resolved this putting the Filter() inside the SortByColumns().
Looks like you got it to work based on response comment
Hey Reza, There is an issui I realized. In DropDown of number of pagination when you choose 5 for exemple and you are in the last number of pages, if you change the dropDown to a greater number of pages (last one) the first number of pages in the label will be greater then the last one. I added Set(varpagenation;1) in the onchange of the dropdown.I dont know if I made me clear. Sorry, I dont speak inglish very much.
I did not understand the question. Video description has link to blog post with formulas.
You may want to post your issue with screenshots on the forums at powerusers.microsoft.com/
@RezaDorrani, Hi Reza... Thank you so much for this video. I am just thinking of creating a component for this pagination. I was wondering why this was not a component. Now i understand that datasources can't be passed to Components... 😢 Any workaround do you have??? Thank you so much for the wonderful video... ❤🙏 Being a developer, just using your videos
The new Table control has inbuilt pagination.
I do not have any workaround for using this as a component.
Hi Reza. If we want the search filter to work for example on the second or third page respectively? How can we achieve that?
Filter will work on all records at once, not page by page.
Hi Reza, no one can better explain this topic like this. Quick question here. we create hidden gallery to replace delegation issue. I saw when you add hidden label for Count Rows you received 300 as output, in my case I just add data source [contain 400 records] as item of gallery. and Count Rows I received 100. Should be okay or Output should be 400?
Gallery loads data in batches of 100. As you move through the items, it will load the next dat set in optimized manner.
@@RezaDorrani Thanks for your response. Can you do one favor please? In my paginated gallery there is one checkbox field, and I put one checkbox outside the gallery called CheckALL. So when I click on CheckALL. It checks all the checkbox. But I want to check the record based on pagination. How can we achieve that?
@@bansaripandya2635 I will have to try it out to let you know the steps. I will recommend you post your query on the forums at powerusers.microsoft.com
Hey Reza how do you combine the pagination code with the filtering code in your main Gallery?
Filter logic is on the hidden gallery.
The main gallery simply paginates the information in hidden gallery.
@@RezaDorrani Got it! Thanks for the quick response!