Hi everyone and Happy Monday to y'all
I'm trying to achieve the following, adding the values from repeatable regions together to then being able output some calculated numbers. But I'm stuck, or maybe it's not possible to use repeatable regions for this, I don't know?
I created one page for holdings, for lets say stocks:
Let's say I have two different stocks and enter them in the 2 repeatable rows:
Entry 01:
stock_name: AAPL
stock_quantity: 2
stock_mktprice: 199
stock_avgprice: 180
Entry 02:
stock_name: GOOG
stock_quantity: 1
stock_mktprice: 1218
stock_avgprice: 1000
I now want to display the following calculations:
stock_quantity* stock_mktprice
stock_quantity* stock_avgprice
And then calculate the Gain/loss in % and in value per stock, and also add those together and get a total gain/loss % and Value and display those. How is this possible?
Many thanks

I'm trying to achieve the following, adding the values from repeatable regions together to then being able output some calculated numbers. But I'm stuck, or maybe it's not possible to use repeatable regions for this, I don't know?
I created one page for holdings, for lets say stocks:
- Code: Select all
<cms:repeatable name='stocks' label='Stock Holdings'>
<cms:editable type='text' name='stock_name' label='Code' col_width='10'/>
<cms:editable type='text' name='stock_quantity' label='Quantity' col_width='10'/>
<cms:editable type='text' name='stock_mktprice' label='Market Price' col_width='10'/>
<cms:editable type='text' name='stock_avgprice' label='Average Price' col_width='10'/>
</cms:repeatable>
Let's say I have two different stocks and enter them in the 2 repeatable rows:
Entry 01:
stock_name: AAPL
stock_quantity: 2
stock_mktprice: 199
stock_avgprice: 180
Entry 02:
stock_name: GOOG
stock_quantity: 1
stock_mktprice: 1218
stock_avgprice: 1000
I now want to display the following calculations:
stock_quantity* stock_mktprice
stock_quantity* stock_avgprice
And then calculate the Gain/loss in % and in value per stock, and also add those together and get a total gain/loss % and Value and display those. How is this possible?
Many thanks
