How to add a conditional attribute for a sum
Posted by
Kannan Ekanath on
URL: https://discuss.orbeon.com/How-to-add-a-conditional-attribute-for-a-sum-tp32243.html
Hi,
I have a repeat set where I have some amount and in the bottom I want to display the total amount. I have said something like,
<xf:output class="twms-total-value"
value="format-number(sum(/laborDetail/hoursSpent), '#.00')">
</xf:output>
However it is possible that some hours spent mite be empty, in which case I want to substitute 0 for empty while calculation. I tried something like,
format-number(
sum(if(number(/taskView/claim/serviceInformation/serviceDetail/laborPerformed/laborDetail/hoursSpent), '#.00')
However this thing errors out saying that in a repeat row I should not use the number() function. Can someone tell me how this can be achieved?
--
Regards,
Kannan Ekanath
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws