copy repeating grid from one completed from to another

33 views
Skip to first unread message

Seth Parkhurst

unread,
Aug 14, 2020, 2:06:09 PM8/14/20
to Orbeon Forms
We have been using HTTP service calls to be able to set controls from one form to another based on some known parameters(Copying information from a previously completed form into a new form where it is editable as needed).  It has worked great till now but we are starting to use repeating grids.  How would this work in a a repeating grid?

Is this possible? We use the standard interface for the action and the service call returns an .xml file to be read.

set control value; controlToBeSet;  /form/section/control

The controlToBeSet does not permit the [iterationNumber] in the action interface.  If the grid repeats more than once how would the action 

Alessandro Vernet

unread,
Aug 18, 2020, 1:01:34 AM8/18/20
to orb...@googlegroups.com
Hi Seth,

I think that your situation is very similar to the one discussed with Adam
in the thread linked below. You'll let me know if this helps.

http://discuss.orbeon.com/Repeated-Grid-number-of-rows-td4665280.html

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

Alessandro Vernet

unread,
Aug 24, 2020, 2:39:20 PM8/24/20
to orb...@googlegroups.com
Hi Seth, did you get to try passing the parameters to your forms, with
something along the line of what was described in the thread I was pointing
to? If so, did that work for you?

Seth

unread,
Aug 24, 2020, 2:43:24 PM8/24/20
to orb...@googlegroups.com
Hello sir,

I have tried to implement it but have had some struggles I will continue to
try and see if I can have some success.

Alessandro Vernet

unread,
Aug 24, 2020, 7:02:30 PM8/24/20
to orb...@googlegroups.com
Got it Seth, you'll let us know if there is something specific we can help
with. Struggling can be good, but we don't want to make you struggle too
much!

‑Alex

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

Seth Parkhurst

unread,
Aug 26, 2020, 2:01:18 PM8/26/20
to Orbeon Forms
In reviewing:

<fr:data-iterate ref="/*/row">
<fr:repeat-add-iteration repeat="my-repeated-grid" at="end"/>

<fr:control-setvalue value="@field" control="result-field" at="end"/>
<fr:control-setvalue value="@dropdown" control="result-dropdown" at="end"/>
</fr:data-iterate>
<fr:control-setitems
items="/*/response/item"
label="@label"
value="@value"
control="result-dropdown"/>
</fr:action>

I think that this is the sample code you were referring to.  My struggle has been since i am wanting to populate the form with the xml file that is part of the service call i am not sure of the basics for what to put in the value = "" and control = "" is that what is coming from the xml file or are those the names of the controls for the grid? and for the file row headers "//fieldName" or is it "/*/fieldName? or does this require something else?

Alessandro Vernet

unread,
Sep 1, 2020, 7:54:47 PM9/1/20
to orb...@googlegroups.com
Hi Seth,

In the `<fr:control-setvalue>`:

- The `control` attribute holds the control name you want to populate.
- And the `value` attribute holds an XPath expression relative to the
current repeat iteration pointing to the node whose value you want to use to
populate the aforementioned control.

If you have an example of the XML returned by your service, I can give you a
hint of what those expressions would look like.

‑Alex

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

Seth Parkhurst

unread,
Sep 10, 2020, 5:29:12 PM9/10/20
to Orbeon Forms
I posted in our Basecamp i am assuming we are still using it.

Alessandro Vernet

unread,
Sep 11, 2020, 7:04:06 PM9/11/20
to orb...@googlegroups.com
Understood Seth, and I've just follow-up on Basecamp, and suggest we continue
the discussion there.
Reply all
Reply to author
Forward
0 new messages