Skip to main content
SuryaLakhani
Level 4
Apr 18, 2025 7:03 PM UTC
Solved

Fusion: Getting Project Count by Status

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. 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sven-iX
Sven-iXAccepted solution
Community Advisor
Apr 21, 2025 5:42 PM UTC

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" )  }}

 

5 replies

Lawson02
Level 6
Apr 18, 2025 8:07 PM UTC

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.

 

 

Translate
SuryaLakhani
Level 4
Apr 18, 2025 8:17 PM UTC

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!

 

Translate
Lawson02
Level 6
Apr 18, 2025 8:20 PM UTC

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

Translate
Sven-iX
Community Advisor
Sven-iXCommunity AdvisorAccepted solution
Community Advisor
Apr 21, 2025 5:42 PM UTC

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" )  }}

 

Translate
kautuk_sahni
Level 9
Jul 16, 2025 11:14 AM UTC

@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!

Translate
Kautuk Sahni