Calculation Field

80 views
Skip to first unread message

Radzwil Ranjit

unread,
Jan 19, 2019, 10:21:11 AM1/19/19
to mementodatabase
How do I add a default value before a calculation?

Example:
I want to add MYR before a calculation of multiple fields  
MYR  #{credit amount} + #{Balance B/F}

Bill Crews

unread,
Jan 19, 2019, 10:31:16 AM1/19/19
to Radzwil Ranjit, mementodatabase
I have no idea. In a JavaScript field, it would be...

return "MYR " + (field("credit amount") + field("Balance B/F"));

Radzwil Ranjit

unread,
Jan 19, 2019, 12:30:38 PM1/19/19
to mementodatabase
It shows error

Bill Crews

unread,
Jan 19, 2019, 12:52:19 PM1/19/19
to Radzwil Ranjit, mementodatabase
Your source code has a right-parenthesis in the wrong place. The numeric right side of the expression should all be in one set of parentheses. I think the numeric-to-string conversion is occurring too early.

--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages