How to copy data from a repeating section when a check box is clicked - InfoPath Dev
in

InfoPath Dev

How to copy data from a repeating section when a check box is clicked

Last post 03-02-2011 03:50 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-25-2011 10:46 AM

    How to copy data from a repeating section when a check box is clicked

    Hi,

     I am having an issue with the repeating section. The scenario is i am having a text box inside a repeating section and a checkbox outside a repeating scetion. I want the value of the textbox to be copied when the repeating section is repeated. This has to be done when i click teh checkbox which is outside the repeating section. I used Xpath formula for this. it works fine if i just repeat the section but not when i click the checkbox which is outside the repeating section.

     The formula is as follows


    ../preceding-sibling::my:RepeatingSection[count(../preceding-sibling::my:RepeatingSection) = count(current()/../preceding-sibling::my:RepeatingSection) - last()]/my:TextBox

    This formula works fine for a single repeating section. But i also have another problem if there are nested sections. for example if i have a repeating section and another repeating section inside it and the textbox inside the nested section. The problem is writing the correct path to navigate within the sections.

     

    Can anyone please help me with this issue

    Thanx in advance :)

  • 02-25-2011 04:45 PM In reply to

    Re: How to copy data from a repeating section when a check box is clicked

    If the checkbox is outside the repeating section, what do you want to have happen when it is checked? All the text boxes get set to the same value? The value of the first text box?

    Hilary Stoupa

  • 02-25-2011 05:00 PM In reply to

    Re: How to copy data from a repeating section when a check box is clicked

    If the check box is selected and when the repeating section is repeated the value in the parent section of the textbox should be copied to the child section. I can give you a daily life example of my scenario, my task is similar to the shopping cart where we fill in the data for the shipping address fields and if we want the same address to the billing address then we click the check box for the address fields to get copied. This is what exactly my scenario is, and i am having the problem with the nested repeating sections where i couldnt get the exact path to the text box.

    Please let me know if i am clear with my question  

  • 03-02-2011 03:50 PM In reply to

    Re: How to copy data from a repeating section when a check box is clicked

    Sorry I've not been able to get back to you on this -- do you have a sample form that shows what you mean? Can you attach it to the Options tab on your reply? I'd be able to take a look at a sample more quickly than if I have to start from scratch....

    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.