Hi, my problem is explained in below image. How to perform calculations which will include the result from previous row in the next. Etc.
Can you help with this. I can attach a form if needed.
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Using FormCalc language will make it easier...
In your balance field you should check if its index is higher than 0, if it is, then you should use the Balance before itself and add it to the current balance.
if ($.parent.index > 0) then
$.rawValue = Income - Expense + $.resolveNode(Concat("Table1.Row1[", $.parent.index - 1,"]")).Balance
else
$.rawValue = Income - Expense
endif
It should be something like this... change the names to use the right reference_syntax
Views
Replies
Total Likes
Using FormCalc language will make it easier...
In your balance field you should check if its index is higher than 0, if it is, then you should use the Balance before itself and add it to the current balance.
if ($.parent.index > 0) then
$.rawValue = Income - Expense + $.resolveNode(Concat("Table1.Row1[", $.parent.index - 1,"]")).Balance
else
$.rawValue = Income - Expense
endif
It should be something like this... change the names to use the right reference_syntax
Views
Replies
Total Likes
Thanks Magus069, it is easier in FormCalc and I didn't know that.
I have one question about code: ", $.parent.index - 1," - commas after and before Quotation marks are part of the syntax?
Views
Replies
Total Likes
Yes, the Concat method in FormCalc is taking any value, converting the value into string and concats all the values together...
If you seperate the values you concat these:
Which should result in any of the rows you have in the form
if $.parent.index -1 is returning the right number, your Field is inside the row directly you only need 1 parent to reach the Row1
if $.parent.index -1 is not returning the right number, check in your hierarchy, your Field should be inside a form, which the form is directly in the row, so you would need 2 parent to reach your Row1
$.parent.index - 1 or
$.parent.parent.index - 1
Views
Replies
Total Likes
Thank you! Very good explained!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies