Fusion: Getting Project Count by Status | Community
Skip to main content
SuryaLakhani
Level 4
April 18, 2025
Solved

Fusion: Getting Project Count by Status

  • April 18, 2025
  • 3 replies
  • 918 views

Hi, 

I am trying to find an easier way to do this, my current solution works, but intermittently results in empty values. I am looking at the number of projects in each status and then pushing it back to Workfront for daily reporting. 

I am searching for a list of projects, then using a numeric aggregator module to get the number of projects in each status (this works perfectly). The aggregator module gives me an array of collections, with each collection containing Status and the count. Then I use an Arrar Aggregator module to combine all the statuses and counts into a single array. Finally, a Set Multiple Variables module will be used to set the count of each status to a matching variable that can be used in the workfornt update call. The Set Multiple Variable is where empty values are recorded intermittently. 

 

 

Best answer by Sven-iX

I'm not clear on what you have in the setvalue module. 

 

If all you want is a count per status, this is what I would do: For each unique status in the collection, it'll use map() to create the list and get the list's length. 

retrieve the status count e.g. for CUR with {{ get( 155.statuses  ; "CUR" )  }}

 

3 replies

Lawson02
Level 6
April 18, 2025

Edit: You do not need the 1 in the value space in screenshot 1. I thought you did but I guess not.

 

I get results from set multiple vars CPL: 110 and DED: 17

 

I used sort on array so that I could hard code the get() function's values 1, 2. If you don't want to do this you don't need to sort and can just use conditional logic to get each value in the right spot.

 

 

SuryaLakhani
Level 4
April 18, 2025

Thanks for sharing! Sort definitely would be an upgrade, but it still relies on 1.result/2.result, and I wanted to get away from that as I have seen intermittent failures with that. Or maybe the failures resulted from the conditional logic that I have in there. 

Will try this!

 

Lawson02
Level 6
April 18, 2025

Add a null check. if(get(4.array; "2.result") = null; 0)

Sven-iX
Community Advisor
Sven-iXCommunity AdvisorAccepted solution
Community Advisor
April 21, 2025

I'm not clear on what you have in the setvalue module. 

 

If all you want is a count per status, this is what I would do: For each unique status in the collection, it'll use map() to create the list and get the list's length. 

retrieve the status count e.g. for CUR with {{ get( 155.statuses  ; "CUR" )  }}

 

kautuk_sahni
Community Manager
Community Manager
July 16, 2025

@suryalakhani Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni