Select to view content in your preferred language

CPC (Capital Project Coordination) Solution Related Table(s) Limitations?

229
4
10-28-2025 06:16 AM
LeahBowyer
Occasional Contributor

Hello,

I'm hoping someone can point me in the right direction. It seems like after our 5th (6th on...) related record entry into our Spending/Expenditures table, our project is unable to update and sync formulas that total our actual cost. Is this a limitation of the related tables? We do have projects with more than 5 related records in our "Spending" table.

 

Thanks in advance!

0 Kudos
4 Replies
Joshua-Young
Honored Contributor

Currently we do not have any projects with more than three expenditures. If I have time in the next week, I will test our setup to see what 5+ related records do.

"Not all those who wander are lost" ~ Tolkien
AndyShoemaker
Esri Contributor

Hi Leah,

Which expressions seem to be failing?

I've run a quick test on my own and it seems to be working with multiple records.

Andy

Andy Shoemaker
0 Kudos
LeahBowyer
Occasional Contributor

Hi Andy!

I've actually modified the expressions similar to @Joshua-Young to sum the expenditures in the spending table and update the "actcost" field in the projects table, so it has been customized from the original solution. Project Expenditures Sum "ActCost" Discussion

Our customized pop-up:

LeahBowyer_0-1761760851833.png

Table in map pop-up is responsive, but the "actcost" field doesn't seem to be responsive. It is likely my code or a oddity about related records that I'm not aware of?

The arcade expression in the form SHOULD in theory sum the "costamount" values entered via the Spending table and populate the "actcost" field in the related Project table record. 

0 Kudos
AndyShoemaker
Esri Contributor

Hi Leah, 

Thanks for the clarification. 

Is the form expression you are using the one in the linked post to populate the actcost field?

At first glance, this should work. The one thing I see in it though is that it is subtracting the total of the expenditures from the estimated budget. Looking at the popup you shared, it appears that this combination could result in odd results. 

If you don't care about the total remaining (ie, estimated cost minus the expenditures), then the code below should work fine. 

var expendituresFS = FeatureSetByRelationshipName($feature, "Spending");
var actcost = Sum(expendituresFS , 'costamount')
return actcost

 

As far as limitations for how many records can be pulled, there shouldn't be any. As silly as it sounds, it may be worth clearing your cache and seeing if that fixes anything.

Andy Shoemaker
0 Kudos