I'm using Canvas for this this app. I've added a Table in Dataverse named AgenGenNewCases that is the dataset I'm using for this. It also has around 120K records.
I've watched this youtube tutorial on how to remove delegation warning and make use of pagination.
I'm using hidden gallery and another to just show the data just like what was created in the tutorial. Now I tried to recreate this
Unfortunately there's no data showing up. Page navigation are working properly for the buttons below but for showing the results itself it is blank. Not sure what step should I do next in fixing this.
On the bottom right of the pic, that's where my hidden gallery named gal_NewCaseAgenHidden that contains this code in Item property.
Filter(
AgenGenNewCases,
StartsWith('Policy Number', txt_policyNumberNewCase.Text)
&& ('Case Status' = drp_CStatus.Selected.Value || IsBlank(drp_CStatus.Selected.Value))
)
Now for the showing of data I have these code in the gallery named gal_NewCaseAgenGen which also has this in Items property.
If(
ico_Next.DisplayMode = DisplayMode.Disabled,
//For Last Set of Records
LastN(
FirstN(
gal_NewCaseAgenHidden.AllItems,
drp_Pagination.Selected.Value = varPageNum
),
drp_Pagination.Selected.Value = (drp_Pagination.Selected.Value * varPageNum - Value(lbl_CountNewCase.Text))
),
LastN(
FirstN(
gal_NewCaseAgenHidden.AllItems,
drp_Pagination.Selected.Value = varPageNum
),
drp_Pagination.Selected.Value
)
)
You can also notice there's an object called lbl_CountNewCase, it only get the total number of rows in my hidden gallery.
CountRows(gal_NewCaseAgenHidden.AllItems)
I've followed all the steps mentioned in the tutorial, not sure if I'm missing something why DATA is not showing.
It is not shown in the picture but on the left of it there's a DELEGATION WARNING also in the gal_NewCaseAgenGen.
@MarkBandR thank you for this. Been with this issue for 2 days. Probably gonna work on the delegation warnings and the page number bug I'm getting. Thanks for the link!
Hi @RazenC
I had not seen this YouTube by Reza. I took a look. Your Items property is set incorrectly. It should be:
If(
ico_Next.DisplayMode = DisplayMode.Disabled,
//For Last Set of Records
LastN(
FirstN(
gal_NewCaseAgenHidden.AllItems,
drp_Pagination.Selected.Value * varPageNum
),
drp_Pagination.Selected.Value = (drp_Pagination.Selected.Value * varPageNum -gal_NewCaseAgenHidden.AllItemsCount))
),
LastN(
FirstN(
gal_NewCaseAgenHidden.AllItems,
drp_Pagination.Selected.Value * varPageNum
),
drp_Pagination.Selected.Value
)
)
For the lines where you have:
drp_Pagination.Selected.Value = varPageNum
You should have:
drp_Pagination.Selected.Value * varPageNum
Also, you can just reference the gal_NewCasseAgenHidden directly to get the AllItemsCount.
https://www.matthewdevaney.com/count-the-rows-in-a-power-apps-gallery-with-allitemscount/
Cool example.
-Mark
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional