cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MJ_RT
Helper I
Helper I

Galleryitem Count

Hello Everyone,

I have created an app that looks like tabbed app (multiple screens and repetitive clickable text labels across the screens).

5 Screens, 5x the tabs in each screen, and 5x the count labels.

the App checker shows "inefficient delay loading" for all labels. the labels are CountRows(GalleryName.AllItems) for each screen.

 

What is the best way to show the count each time i move across the "tabs" and refresh these labels when filter criteria changes.

 

MJ_RT_0-1616351644251.png

MJ_RT_2-1616351722963.png

 

Thanks

 

4 REPLIES 4
rubin_boer
Super User
Super User

hi @MJ_RT can you give a bit more information about the app. these tabs what are they to represent, i assume it's not columns but conditions based on your datasource. the rationale behind the question is to see the best way of creating the tabs which can give the counts as. when you click on the a tab does it navigate to a screen that show some content in another control such as gallery and each page has its own cgallery control for example?

 

Hello Rubin_boer, Thank you for your reply.

I have 5 screens, each screen has a gallery from the same datasource (SharePoint list) based on different filters.

for example:

1st screen is the list of all tasks with no owner and items are in warehouse (has a button assign to me) 

2nd screen is the list of tasks assigned to me and items are in warehouse and multiple items for delivery

3rd screen is the list of tasks assigned to me and items are in warehouse single item for delivery

4th screen is the list of tasks where items are not yet in warehouse.

and so on.

the click of each label (tab) navigates to different screen.
the counter is also repeated each time you navigate to different screen.

 

hope this helps.

hi @MJ_RT  seeing it sone SharePoint list you can build the tab with a gallery

 

Consider you need to create tabs which are filters on your data set you could collect the data and then build you tabs like this

 

Add a horizontal gallery and add two labels, 1 for you tab header and one that will hold the totals

 

Data source is ClearCollect(colSP4,ForAll(Sequence(1000),{name: "Person: " & Mod(Value,10), score: Rand()*Value*100, zone: Value}))

I created a tab with some conditions (Filter(colSP4,zone<6)), this gives me 5 rows and added the column name as my header, you can use any condition to create a header name (if switch etc) or you can leave your tabs as is.

rubin_boer_0-1616359102052.png

The totals are based on the conditions you have for each table.

Switch(true,ThisItem.name,

"Person: 1",

CountRows(Filter(colSP4, And(score > 50,Mod(zone,4)>2))),

"Person: 2",

0,

"Person: 3",

CountRows(Filter(colSP4, And(name = ThisItem.name,score > 150,Mod(zone,4)>2))),

"Person: 4",

CountRows(Filter(colSP4, And(name = ThisItem.name,score > 200,Mod(zone,4)>2))),

"Person: 5",

CountRows(Filter(colSP4, And(name = ThisItem.name,score > 250,Mod(zone,4)>2)))

)

 

Result

Clicking tab 2

rubin_boer_1-1616359466256.png

Clicking tab 3

rubin_boer_2-1616359497198.png

 

In the horizontal gallery i made the font of the totals the same as the back ground of the tab header this way it i shidden when th user i snot clicking on it.  I set the colour of the text of tab header to If(Self.Text= MyGallery.Selected.name,RGBA(44, 44, 44, 1), WhiteSmoke) and im filling it Fill = If(Self.Text= MyGallery.Selected.name,RGBA(245, 245, 245, 1), RGBA(44, 44, 44, 1)). Now when th euser click the label the totals show without delay

 

By doing it thi sway you reduced your control and speed up your app a bit. hope this can work for you. If you choose to keep your app as is, consider to create a collection and derive the totals from the collection not directly from the sharepoint connection

 

 

 

Thank you for your detailed reply, however, I am about to launch the app to the organization.
I may try it in the next version or in the next app that I am also working on.

 

Thanks once again

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,232)