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

Countrows in a gallery and save the number to a sharepoint list

Hi guys,

 

 

I have a gallery connected to a different sharepoint list , that shows me "done" and "pending" items. To my main list i will add 2 columns, Done and Pending and would like to show those numbers in there. Like 6 pending,  5 done.

Each item in the master list will show like max 10-12 done pending items.

 

Any idea how to do this  ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Countrows in a gallery and save the number to a sharepoint list

Hi @Babalaul,

 

My understanding is that you only want to modify one item in the master list, to make their values in pending and done columns shown as the number of items in another list. If my understanding is correct, then you could set the Text property of the 2 Label controls to:

 

Label1.Text=CountRows(Filter(List,Status.Value="Pending"))
Label2.Text=CountRows(Filter(List,Status.Value="Done"))

 

Then use Patch function to update this to the corresponding columns in master list.

 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Re: Countrows in a gallery and save the number to a sharepoint list

Hello @Babalaul

Just to clarify, based on a certain column that contains several rows with "Pending" and "Done" values, you would like to generate 2 items: One containning the total number of "Pending" values occurences and another containning the number of "Done" occurences. Is this correct?

Babalaul Helper I
Helper I

Re: Countrows in a gallery and save the number to a sharepoint list

Based on another list actually. So my master list has file numbers. and my secondary list has the items that are pending or done for each file number. I linked them together with powerapps. But now i would like to add 2 extra columns on my master list, one will show the number of items pending and the other one the number of items are done for each file number. 

Community Support
Community Support

Re: Countrows in a gallery and save the number to a sharepoint list

Hi @Babalaul,

 

My understanding is that you only want to modify one item in the master list, to make their values in pending and done columns shown as the number of items in another list. If my understanding is correct, then you could set the Text property of the 2 Label controls to:

 

Label1.Text=CountRows(Filter(List,Status.Value="Pending"))
Label2.Text=CountRows(Filter(List,Status.Value="Done"))

 

Then use Patch function to update this to the corresponding columns in master list.

 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (9,489)