« Return to Thread: increment/decrement value after insert/delete row?

Re: increment/decrement value after insert/delete row?

by Alessandro Vernet :: Rate this Message:

Reply to Author | View in Thread

On Tue, May 13, 2008 at 10:40 AM, Masen J <masenjabban@...> wrote:
>  I have a repeat(into a table row) where you can select from a select1.
>  Now I want to increment the value(for instance <label>ten</label>
> <value>10</value>) everytime a new row is inserted.
>  So next time, when the user "adds" an new row and chooses from the select1
> "ten" it schould be value=+1.
>  Other way round when its deleted..

Wouldn't a simple "calculate" expression in an <xforms:bind> do the
trick here? I.e. you set the value of node based on the
count(/expression/to/rows).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet

 « Return to Thread: increment/decrement value after insert/delete row?

LightInTheBox - Buy quality products at wholesale price