Is there any way to use more than one data instance?

6 views
Skip to first unread message

leosmk

unread,
Nov 19, 2020, 12:19:12 PM11/19/20
to orb...@googlegroups.com
Hello!
I need to use more than one data instance ("fr-form-instance" and custom
instance). Is it possible with Orbeon Forms?

--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

unread,
Nov 19, 2020, 4:06:07 PM11/19/20
to orb...@googlegroups.com
If this is in the context of a form create with Form Builder, you can edit
the source of the form and add your own instances there. However fields you
create with Form Builder won't know about your other instance(s) and fields
you create with Form Builder will always be bound to elements in
`fr-form-instance`.

Does this help? If not, could you tell us more about what you're trying to
achieve that calls for additional instances?

-Alex

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

leosmk

unread,
Nov 20, 2020, 3:48:15 AM11/20/20
to orb...@googlegroups.com
Alessandro Vernet wrote
> If this is in the context of a form create with Form Builder, you can edit
> the source of the form and add your own instances there.

I tried to do this, but it seems that Form Runner doesn't save changes in
custom instances... I see that all fields that bound to my own instance left
unchanged when I click "Save" button.

Alessandro Vernet

unread,
Nov 20, 2020, 6:40:56 PM11/20/20
to orb...@googlegroups.com
Yes, only the content of `fr-form-instance` is saved. Could you tell us more
about the problem you are trying to solve by creating more than one
instance?

-Alex

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

Alessandro Vernet

unread,
Nov 27, 2020, 8:29:33 PM11/27/20
to orb...@googlegroups.com
Have a found a workaround or way to handle your use case? If not, could you
tell us more about the use case you are trying to solve, as there are maybe
other way to handle it.

leosmk

unread,
Dec 3, 2020, 8:20:22 AM12/3/20
to orb...@googlegroups.com
Alessandro Vernet wrote
> Yes, only the content of `fr-form-instance` is saved. Could you tell us
> more
> about the problem you are trying to solve by creating more than one
> instance?

I need to send XML data from Orbeon Forms to external system. External
system requires XML data to conform specific XSD schema.
It's very difficult to do so without at least one custom instance.

Alessandro Vernet

unread,
Dec 3, 2020, 4:55:06 PM12/3/20
to orb...@googlegroups.com
I imagine that you are using a `send()` action in a process to get the data
to your service. In which case, I would recommend that you send the standard
data formats that Orbeon Forms creates, but instead of sending it to your
final service, you send it to what we could call a "trampoline service",
which does the necessary transformation, maybe using XSLT, before sending
the transformed data to your service. Would something along those lines work
for you?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply all
Reply to author
Forward
0 new messages