I have a blocking problem: an instance is optional and has to be write on an sql db by the sql processor. So if the instance has a value then the value has to be written in the db. But if the instance is empty then a null has to be written in the db. How can I implement this?
In the sql param construct this logic cannot be implemented because it doesn't support the if construct. So I tried building a dynamic query by using a sql param with type odt:literalString and replace=true. But I have got an error (odt:literalString isn't supported). Now I don't have any idea on how to bypass this issue. Any idea? Thanks. -- 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 |
Hi Alessandro,
> I have a blocking problem: an instance is optional and has to be write on an > sql db by the sql processor. So if the instance has a value then the value > has to be written in the db. But if the instance is empty then a null has to > be written in the db. How can I implement this? > In the sql param construct this logic cannot be implemented because it > doesn't support the if construct. maybe you could build the query using a xslt processor. There, you can use all the xsl:if, xsl:choose and xsl:for-each control structure elements to construct the query depending on your needs. Then, you can reference the output of the xslt processor using the href attribute in the config input of the sql processor. HTH florian -- 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
|
In reply to this post by Vancheri, Alessandro
See my answer in the other thread.
We documented the @null attribute now. We realized that the attribute should maybe simply named @null instead of @null-if, for the sake of shortness as well as dislike for extra "-" in attribute names. So @null-if is still supported but with new builds the new @null attribute is preferred. They will do the same thing. -Erik On Jan 31, 2008, at 8:11 AM, Vancheri, Alessandro wrote: > I have a blocking problem: an instance is optional and has to be > write on an sql db by the sql processor. So if the instance has a > value then the value has to be written in the db. But if the > instance is empty then a null has to be written in the db. How can I > implement this? > > In the sql param construct this logic cannot be implemented because > it doesn't support the if construct. > > So I tried building a dynamic query by using a sql param with type > odt:literalString and replace=true. But I have got an error > (odt:literalString isn't supported). > > Now I don't have any idea on how to bypass this issue. > > Any idea? > > Thanks. > > > -- > 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 |
Many thanks for your answer. Please, where is documented the @null attribute?
-----Messaggio originale----- Da: Erik Bruchez [mailto:[hidden email]] Per conto di Erik Bruchez Inviato: giovedì 31 gennaio 2008 20.12 A: [hidden email] Oggetto: Re: [ops-users] Dynamic sql query doesn't work See my answer in the other thread. We documented the @null attribute now. We realized that the attribute should maybe simply named @null instead of @null-if, for the sake of shortness as well as dislike for extra "-" in attribute names. So @null-if is still supported but with new builds the new @null attribute is preferred. They will do the same thing. -Erik On Jan 31, 2008, at 8:11 AM, Vancheri, Alessandro wrote: > I have a blocking problem: an instance is optional and has to be write > on an sql db by the sql processor. So if the instance has a value then > the value has to be written in the db. But if the instance is empty > then a null has to be written in the db. How can I implement this? > > In the sql param construct this logic cannot be implemented because it > doesn't support the if construct. > > So I tried building a dynamic query by using a sql param with type > odt:literalString and replace=true. But I have got an error > (odt:literalString isn't supported). > > Now I don't have any idea on how to bypass this issue. > > Any idea? > > Thanks. > > > -- > 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
|
Here:
http://www.orbeon.com/ops/doc/processors-sql#sql-query-update Search for "sql:param" or "null". -Erik On Jan 31, 2008, at 11:55 AM, Vancheri, Alessandro wrote: > Many thanks for your answer. Please, where is documented the @null > attribute? > > -----Messaggio originale----- > Da: Erik Bruchez [mailto:[hidden email]] Per conto di Erik Bruchez > Inviato: giovedì 31 gennaio 2008 20.12 > A: [hidden email] > Oggetto: Re: [ops-users] Dynamic sql query doesn't work > > See my answer in the other thread. > > We documented the @null attribute now. We realized that the > attribute should maybe simply named @null instead of @null-if, for > the sake of shortness as well as dislike for extra "-" in attribute > names. So @null-if is still supported but with new builds the new > @null attribute is preferred. They will do the same thing. > > -Erik > > On Jan 31, 2008, at 8:11 AM, Vancheri, Alessandro wrote: > >> I have a blocking problem: an instance is optional and has to be >> write >> on an sql db by the sql processor. So if the instance has a value >> then >> the value has to be written in the db. But if the instance is empty >> then a null has to be written in the db. How can I implement this? >> >> In the sql param construct this logic cannot be implemented because >> it >> doesn't support the if construct. >> >> So I tried building a dynamic query by using a sql param with type >> odt:literalString and replace=true. But I have got an error >> (odt:literalString isn't supported). >> >> Now I don't have any idea on how to bypass this issue. >> >> Any idea? >> >> Thanks. >> >> >> -- >> 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 |
It works! Great!! Thank you!!!
-----Messaggio originale----- Da: Erik Bruchez [mailto:[hidden email]] Per conto di Erik Bruchez Inviato: giovedì 31 gennaio 2008 21.07 A: [hidden email] Oggetto: Re: R: [ops-users] Dynamic sql query doesn't work Here: http://www.orbeon.com/ops/doc/processors-sql#sql-query-update Search for "sql:param" or "null". -Erik On Jan 31, 2008, at 11:55 AM, Vancheri, Alessandro wrote: > Many thanks for your answer. Please, where is documented the @null > attribute? > > -----Messaggio originale----- > Da: Erik Bruchez [mailto:[hidden email]] Per conto di Erik Bruchez > Inviato: giovedì 31 gennaio 2008 20.12 > A: [hidden email] > Oggetto: Re: [ops-users] Dynamic sql query doesn't work > > See my answer in the other thread. > > We documented the @null attribute now. We realized that the attribute > should maybe simply named @null instead of @null-if, for the sake of > shortness as well as dislike for extra "-" in attribute names. So > @null-if is still supported but with new builds the new @null > attribute is preferred. They will do the same thing. > > -Erik > > On Jan 31, 2008, at 8:11 AM, Vancheri, Alessandro wrote: > >> I have a blocking problem: an instance is optional and has to be >> write on an sql db by the sql processor. So if the instance has a >> value then the value has to be written in the db. But if the instance >> is empty then a null has to be written in the db. How can I implement >> this? >> >> In the sql param construct this logic cannot be implemented because >> it doesn't support the if construct. >> >> So I tried building a dynamic query by using a sql param with type >> odt:literalString and replace=true. But I have got an error >> (odt:literalString isn't supported). >> >> Now I don't have any idea on how to bypass this issue. >> >> Any idea? >> >> Thanks. >> >> >> -- >> 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 |