I'm pretty sure this is a problem with what I'm returning. Just not sure how to do this:
ProjCostTransCost projcostTransCost;
TransactionID transId;
transId = SysComputedColumn::returnField(tableStr(ProjCostTransView), identifierStr(ProjCostTrans), fieldStr(ProjCostTrans, TransId));
select sum(CostAmountLedger) from projCostTransCost
where projCostTransCost.TransId == transId;
return num2str(projcostTransCost.costAmountLedger, 0, 2, DecimalSeparator::Dot, ThousandSeparator::Comma);
In SSMS, I can see the t-sql from my view for this field as:
(CAST ((0.00) AS NVARCHAR(15))) AS TOTALCOSTAMOUNTACTUAL (Amongst the other field selections)
This would explain why I see all 0.00.