How to Auto increment a value when a record is
added in xforms
i have tried following code but getting An empty sequence is not allowed as the first argument of instance() exception <xforms:setvalue
ref="instance(programs-instance)/program[id]"
value="(instance(programs-instance)/program[id])+1"/> Thanks,
Srikanth -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
You are missing quotes around the name of your instance. Try:
<xforms:setvalue ref="instance('programs-instance')/program[id]" value="(instance('programs-instance')/program[id])+1"/> -Erik On Nov 21, 2008, at 12:01 AM, Srikanth A wrote: > How to Auto increment a value when a record is added in xforms > i have tried following code but getting > An empty sequence is not allowed as the first argument of instance() > exception > > <xforms:setvalue ref="instance(programs-instance)/program[id]" > value="(instance(programs-instance)/ > program[id])+1"/> > > Thanks, > Srikanth > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Erik,
Failure converting untyped value to a number exception is thrown When I click on save button I want to increment the id value based on previous node id value. Thanks, Srikanth -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] Sent: Friday, November 21, 2008 10:30 PM To: [hidden email] Subject: [ops-users] Re: Auto Increment a Value You are missing quotes around the name of your instance. Try: <xforms:setvalue ref="instance('programs-instance')/program[id]" value="(instance('programs-instance')/program[id])+1"/> -Erik On Nov 21, 2008, at 12:01 AM, Srikanth A wrote: > How to Auto increment a value when a record is added in xforms i have > tried following code but getting An empty sequence is not allowed as > the first argument of instance() exception > > <xforms:setvalue ref="instance(programs-instance)/program[id]" > value="(instance(programs-instance)/ > program[id])+1"/> > > Thanks, > Srikanth > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
This probably means that at some point instance('programs-instance')/
program[id] does not contain a number. Try hooking up the instance inspector to see what's in the instance before you press the button. -Erik On Nov 22, 2008, at 12:06 AM, Srikanth A wrote: > Erik, > Failure converting untyped value to a number exception is thrown > When I click on save button > I want to increment the id value based on previous node id value. > Thanks, > Srikanth > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] > Sent: Friday, November 21, 2008 10:30 PM > To: [hidden email] > Subject: [ops-users] Re: Auto Increment a Value > > You are missing quotes around the name of your instance. Try: > > <xforms:setvalue ref="instance('programs-instance')/program[id]" > value="(instance('programs-instance')/program[id])+1"/> > > -Erik > > On Nov 21, 2008, at 12:01 AM, Srikanth A wrote: > >> How to Auto increment a value when a record is added in xforms i have >> tried following code but getting An empty sequence is not allowed as >> the first argument of instance() exception >> >> <xforms:setvalue ref="instance(programs-instance)/program[id]" >> value="(instance(programs-instance)/ >> program[id])+1"/> >> >> Thanks, >> Srikanth >> >> -- >> 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 >> OW2 mailing lists service home page: http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |