spinaka
4 years agoNew Contributor III
Cumulative sum of a value in an array
Hi Everyone,
I need help on an expression solution. The “sum” should be the sum of the value(s) of “key2” from previous records till the current record within the array.
I’m trying to make it usi...
- 3 years ago
Hi @manohar.
In the example you have listed, If i understand correctly don’t we also need to include the filename: Coupa_Supplier_SB_Tax_Cert_PO_4501888888? Because it exists in the docname array?
If yes, then you can use the following expressions:
$docname.filter((x,ind,arr) => $filename.indexOf(x) != -1) $docid.filter((x,ind) => $filename.indexOf($docname[ind]) != -1) $docext.filter((x,ind) => $filename.indexOf($docname[ind]) != -1)
Let me know if this helps.
BR,
Aleksandar.