Fill a repeated grid

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

Fill a repeated grid

Aaron Spike
We would like person #1 to fill in a form specifying 5-10 dates in a repeated grid. Then we would like person #2 to fill in a second form where the dates entered by person #1 are filled automatically at form load. I've seen a few (IMHO cryptic) posts that I think address this technique:

http://stackoverflow.com/questions/25972198/fill-repeated-grid-by-http-service-action-in-orbeon-4-5
http://stackoverflow.com/questions/32726978/fill-a-repeated-grid-from-a-sql-database-in-orbeon-4-10

But I'm having trouble understanding exactly what I need to do to make it happen. Is this a viable technique to use with Form Builder? Can anyone offer a more step-by-step description of the process?

Aaron

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Fill a repeated grid

Aaron Spike
An update: I wasn't as confused as I thought I was. I had been following the pattern put forth in this older blog post (http://blog.orbeon.com/2008/02/more-powerful-xforms-actions-thanks-to_12.html ).

I had come up with the following response actions:
                <!-- Response actions -->
                <xf:action event="xforms-submit-done" ev:observer="grid_fill_test-submission"
                           context="instance('fr-service-response-instance')">
                               
                      <xf:action xxf:iterate=".//row">
                               
                        <xf:insert context="instance('fr-form-instance')//grid-3" ref="grid-3-iteration"
                                   origin="instance('grid-3-template')"/>
                        <xf:setvalue ref="instance('fr-form-instance')//grid-3/grid-3-iteration[last()]/exp-date"
                                     value="context()//exp-date"/>
                        <xf:setvalue ref="instance('fr-form-instance')//grid-3/grid-3-iteration[last()]/exp-choice"
                                     value="context()//exp-choice"/>
                      </xf:action>



                    <!-- Response actions will be here -->
                </xf:action>

but nothing was happening. It was as if the action wasn't even running. And of course that was exactly the problem. Actions meant to run on creation only don't run when using the test button. I've run into this before. Is there a solution to this? Very difficult to actually test forms with the test button. Many things (actions, url parameters, etc. ) require actually publishing the form.

Aaron


This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Fill a repeated grid

Alessandro  Vernet
Administrator
Hi Aaron,

There are indeed a few improvements the test functionality in Form Builder could benefit from! For the URL parameters, we have the following RFE:


Was grid_fill_test-submission generated based on an HTTP service you created? And you have an action running it on form load, but it doesn't run when using the test button. Was that the issue?

Alex

On Wednesday, December 28, 2016, Aaron Spike <[hidden email]> wrote:
An update: I wasn't as confused as I thought I was. I had been following the pattern put forth in this older blog post (http://blog.orbeon.com/2008/02/more-powerful-xforms-actions-thanks-to_12.html ).

I had come up with the following response actions:
                <!-- Response actions -->
                <xf:action event="xforms-submit-done" ev:observer="grid_fill_test-submission"
                           context="instance('fr-service-response-instance')">
                               
                      <xf:action xxf:iterate=".//row">
                               
                        <xf:insert context="instance('fr-form-instance')//grid-3" ref="grid-3-iteration"
                                   origin="instance('grid-3-template')"/>
                        <xf:setvalue ref="instance('fr-form-instance')//grid-3/grid-3-iteration[last()]/exp-date"
                                     value="context()//exp-date"/>
                        <xf:setvalue ref="instance('fr-form-instance')//grid-3/grid-3-iteration[last()]/exp-choice"
                                     value="context()//exp-choice"/>
                      </xf:action>



                    <!-- Response actions will be here -->
                </xf:action>

but nothing was happening. It was as if the action wasn't even running. And of course that was exactly the problem. Actions meant to run on creation only don't run when using the test button. I've run into this before. Is there a solution to this? Very difficult to actually test forms with the test button. Many things (actions, url parameters, etc. ) require actually publishing the form.

Aaron


This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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 <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;orbeon%2Bunsubscribe@googlegroups.com&#39;);" target="_blank">orbeon+unsubscribe@googlegroups.com.
To post to this group, send email to <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;orbeon@googlegroups.com&#39;);" target="_blank">orbeon@....

--
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 [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Fill a repeated grid

Aaron Spike


On Friday, December 30, 2016 at 6:06:08 PM UTC-6, Alessandro Vernet wrote:

Was grid_fill_test-submission generated based on an HTTP service you created? And you have an action running it on form load, but it doesn't run when using the test button. Was that the issue?

It was a database service, form load and run only on creation. I think it is the "run only on creation" part that might be causing the trouble.

Now that I know what to expect I will be able to work around it. Here's the last time I noticed it ;-): 
https://twitter.com/orbeon/status/697118211527999488

Aaron

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Fill a repeated grid

Aaron Spike
I should also probably ask what would be involved (which files need to be changed, etc) to add actions that insert or replace grid iterations with data from a service?

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Fill a repeated grid

Alessandro  Vernet
Administrator
Hi Aaron,

Is what you'd like to do captured but the following RFE?

https://github.com/orbeon/orbeon-forms/issues/1298

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