pass document_id to navigate function

12 views
Skip to first unread message

Andrzej Kaczówka

unread,
Nov 26, 2020, 9:12:25 AM11/26/20
to Orbeon Forms
Hi,

I have a "Send" button, which do below actions:

<property as="xs:string" name="oxf.fr.detail.process.send.wniosek.andrzej-test" >
    save()
    then send(
        method     = "post",
        content    = "xml"
    )
    then navigate(uri = "javascript:of_success('{//token}')")
</property>

save() and send() creates document and insert data to orbeon_form_data table.
Is it possible to get "id" or "document_id" of created document and pass it to function navigate() ?
Something like that: then navigate(uri = "javascript:of_success('{ xxf:get-request-attribute('document_id ')}') ?

I'd like to know in javascript function ID of the created document. How to do it?

Thanks,
Andrzej

Jarosław Kowalewski

unread,
Nov 26, 2020, 10:11:20 AM11/26/20
to orb...@googlegroups.com
Hi,
one of the option is to use xxf:instance('fr-parameters-instance')//document 
e.g. 
then navigate(uri = "javascript:of_success('{ xxf:instance('fr-parameters-instance')//document   }')")  

//Jarek


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/ef272201-cf53-4b31-9ab3-aacca1bd4360n%40googlegroups.com.

Andrzej Kaczówka

unread,
Nov 26, 2020, 10:37:53 AM11/26/20
to Orbeon Forms
Great! It works!

Dzięki,
Andrzej

Reply all
Reply to author
Forward
0 new messages