Using preceding-sibling
Hi
Been stuck on using this formula...
(../../../my:OpeningBal | preceding-sibling::*[1]/ClosingTransBalance)[(count(preceding-sibling::*/TransID) = 1) + 1]
Let me explain...
it is an IF statement
the true result being ../../../my:OpeningBal
the false result being preceding-sibling::*[1]/ClosingTransBalance
i.e. it sets the value to the field ClosingTransBalance of the previous item in the Repeating table.
Condition: count(preceding-sibling::*/TransID) = 1
it counts whether there is ONE item in the items repeating table
Thanks
Ced
|