increment/decrement value after insert/delete row?

View: New views
2 Messages — Rating Filter:   Alert me  

increment/decrement value after insert/delete row?

by masjab :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey all,

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..

Does anyone know how?
THX


--
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

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

by Alessandro Vernet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
http://www.orbeon.com/