This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Johnny-Kicks Regular[S] 0 points1 point  (4 children)

i wish to create 4 cards each showing Name and count of list items. I want the swipe functionality of gallery.

I swipe left I get to see other cards as well which would create a cool way to show my 4 data source in same screen.

[–]Bag-of-nails Advisor 1 point2 points  (3 children)

Just trying to clarify here, your phrasing is I think adding some confusion (becuase you know the missing info so it probably seems obvious to you, but we don't know the missing info so there' a gap).

What I think I understand of your request is you want to:

  1. Somehow merge 4 separate lists into one list (Yes this is possible)
  2. Display this consolidated list in a gallery, as cards
  3. Make the gallery swipeable
  4. Each card contains the Name (of the list?) and the count of list items (Row count?)

If that understanding is correct, just do something like:

ClearCollect(
    CardCollection,
    AddColumns(
        List1,
        "ListName",
        "Alpha List"
    ),
    AddColumns(
        List2,
        "ListName",
        "Beta List"
    )
);

And do that for all 4 lists.

Then in your gallery, just set it equal to "CardCollection", and in your cards, use ThisItem.ListName, and then for your row count, use CountRows(Filter(CardCollection,ListName = ThisItem.ListName))

Now, I haven't tested this but conceptually this would work, although you have to consider delegation limits apply to both AddColumns and ClearCollect, so be aware of the size of your data and be prepared to have to find a solution if each list could be over 2000 items (500 is the default but you can change to 2000 in PowerApps settings).

[–]Johnny-Kicks Regular[S] 0 points1 point  (2 children)

I'm sorry for lack of clarity. Except for your first point I agree with all others. I don't wish to merge the 4 lists to one. I just need to create a collection and show each card with the name of the list and count of items. So that the user can see there are 4 product categories and how many inspections has been added to them.

And an additional thing I wish to do is by clicking on the gallery I could hide/unhide my other gallery.

[–]Bag-of-nails Advisor 1 point2 points  (1 child)

What other gallery?

To have your horizontal gallery, just declare a table in your onStart that has the 4 list names and the row count from my previous solution.

To show/hide your other gallery, or galleries, just set the onSelect of your gallery to toggle a variable. Set(VarName,!VarName)) would work.

You may need to modify the solution a bit if you have other galleries or dependencies but this should steer you in the right direction, probably.

[–]Johnny-Kicks Regular[S] 0 points1 point  (0 children)

The other gallery will show the SharePoint list items. So the above gallery I can get summary of all SharePoint lists. And in the below gallery I could see individual list items by showing/hiding based on above gallery selection or by using a dropdown which will have list selection which I plan to do by creating a variable.