Getting document_id

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting document_id

r.pecori
Hi,

I am running Orbeon Forms 4.0.0.rc1.201302120214 PE with development licence.

How can  I get orbeon document_id  from the table orbeon_form_data at the moment of saving data in the DB?
using some xform function? which one? I have to pass it to a custom portlet of mine.

thank you
Reply | Threaded
Open this post in threaded view
|

Re: Getting document_id

Alessandro  Vernet
Administrator
Within a form running in Form Runner, you can get the current document id:

- from XForms with xxf:instance('fr-parameters-instance')/document
- from JavaScript with $('#fr-parameters-instance-document .xforms-output-output').text()

Note that those are undocumented API, and are thus more likely to change between releases (and since they are not documented, this most likely won't be mentioned in the release notes).

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet