I have a field where I am trying to infer a decimal value using the following:

let fNode = wfschema.asAnalysisPosition(focusNode)
let media = fNode.media
let sum_media = media?.reduce((cur, val) => cur + val.mediaDevelopmentHours, 0)
let perfSupp = fNode.performanceSupportMaterials
let sum_perfSupp = perfSupp?.reduce((cur, val) => cur + val.developmentHours, 0)
let estTime = fNode.estimatedTimeToCompletion
if(media && media.length > 0 && perfSupp && perfSupp.length > 0 && estTime) 
(sum_media + sum_perfSupp) * estTime

It is returning an NaN and I cannot figure out why. I have verified that each 
of the properties it is looking at has a decimal datatype. How else should I 
troubleshoot?

Please let me know if additional information is required. Thanks!

GaBriella Branson
Interagency Wildland Fire Data Management - Knowledge Manager
U.S. Department of the Interior, Office of Wildland Fire
Mobile: 907-483-0330 | gabriella_bran...@ios.doi.gov
Follow us online: Website<https://www.doi.gov/wildlandfire> | 
Facebook<https://www.facebook.com/DOIWildlandFire> | 
Flickr<https://www.flickr.com/photos/usinterior/albums/72157711571382637/> | 
X<https://x.com/doiwildlandfire>
Stay connected! Sign up to receive email 
updates<https://public.govdelivery.com/accounts/USDOIOWF/subscriber/new>

[Logo for the Interior Department's Office of Wildland Fire]   
[cid:image002.png@01DB3C45.7BB87DE0]

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/topbraid-users/CO6PR09MB7319351504DD77749220F2B0DA232%40CO6PR09MB7319.namprd09.prod.outlook.com.

Reply via email to