How to count List data and send the total to another List?

  • 20 November 2020
  • 1 reply
  • 10 views

Badge

Hi, I have hopefully an easy question... 

 

I have a very simple Sharepoint list that has a 'Deliverables' column, where the user can select a choice from a dropdown list. I want to count how many of each choices there are and send the total of each Deliverable to another Sharepoint List.

 

Is this possible, and if not is there another way to do this?


1 reply

Badge +12

@sheather  try below steps:

 

  1. Query your list and store "Deliverables" into a collection e.g. collec_Deliverables
  2. Using Collection Operations:
    1. Target Collection - collec_Deliverables
    2. Remove Duplicates
    3. Store Results in - collec_Unique_Deliverables
    4. Using For Loop, for each collec_Unique_Deliverables
      1. Store values in slt_Unique_Deliverable
      2. Query your list again and do
        1. Apply filter --> "Deliverables" = slt_Unique_Deliverable
        2. Store results in collection --> collec_Count_Unique_Deliverables
      3. Use Collection Operations and get the count of collec_Count_Unique_Deliverables variable

This way your solution will be dynamic and won't have to update the workflow if requirement changes.

Reply