Hi,
I am new to Orbeon, XForms and xml database. I managed putting document's uuid in one field by editing the source, following one of posts here. I'd like to put the last update-time of the document in another field. How do I access that piece of information? Thanks! regards, Jeff |
Administrator
|
Jeff,
At which point do you need this information? The thing is, for example with the eXist persistence implementation, the last modified date is metadata set by the database itself, not by Orbeon: xmldb:last-modified($collection-name, $resource-name) So this information must be retrieved specifically as it is not part of the XML document itself. Currently it is retrieved only by the summary page, not by the detail page. -Erik On Fri, Dec 9, 2011 at 3:13 AM, jeffhu <[hidden email]> wrote: > Hi, > > I am new to Orbeon, XForms and xml database. I managed putting document's > uuid in one field by editing the source, following one of posts here. I'd > like to put the last update-time of the document in another field. How do I > access that piece of information? Thanks! > > regards, > Jeff > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/How-to-put-document-s-last-update-time-in-a-field-tp4176177p4176177.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > -- 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 Erik,
Thanks for the reply. My idea is the field is updated whenever the user saves the document, so that the information is available to external applications inside the document. Can I use the expression you gave below to populate the field? Right now I am using current-dateTime() as calculated value, which seems to serve the purpose. On a related note, I also have a field called creation-time. I populate its default value with current-dateTime(). But it seems to change every time I save the document. Did I misunderstand that the default value is the initial value and will remain unchanged? If so how do I get the creation time from the meta-data? Much appreciated, as always. regards, Jeffrey
|
Administrator
|
> Can I use the expression you gave below to populate the field? Right now I
> am using current-dateTime() as calculated value, which seems to serve the > purpose. Yes absolutely, that will work. > On a related note, I also have a field called creation-time. I populate its > default value with current-dateTime(). But it seems to change every time I > save the document. Did I misunderstand that the default value is the initial > value and will remain unchanged? If so how do I get the creation time from > the meta-data? The initial value (using the badly named xxforms:default attribute) will run every time the form is loaded. But you can fix this using an expression such as: xxforms:default="if (normalize-space() = '') then current-dateTime() else ." -Erik > > Much appreciated, as always. > > regards, > Jeffrey > > Erik Bruchez wrote >> >> Jeff, >> >> At which point do you need this information? >> >> The thing is, for example with the eXist persistence implementation, >> the last modified date is metadata set by the database itself, not by >> Orbeon: >> >> xmldb:last-modified($collection-name, $resource-name) >> >> So this information must be retrieved specifically as it is not part >> of the XML document itself. Currently it is retrieved only by the >> summary page, not by the detail page. >> >> -Erik >> >> On Fri, Dec 9, 2011 at 3:13 AM, jeffhu <jeffrey.hu@> wrote: >>> Hi, >>> >>> I am new to Orbeon, XForms and xml database. I managed putting document's >>> uuid in one field by editing the source, following one of posts here. I'd >>> like to put the last update-time of the document in another field. How do >>> I >>> access that piece of information? Thanks! >>> >>> regards, >>> Jeff >>> >> > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/How-to-put-document-s-last-update-time-in-a-field-tp4176177p4195669.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > -- 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 |