Infopath 2013 help with prepopulating a repeating table field. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Infopath 2013 help with prepopulating a repeating table field.

Last post 03-09-2017 07:10 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 03-07-2017 03:50 PM

    Infopath 2013 help with prepopulating a repeating table field.

    Long time reader first time poster: Newbie question I hope.

    I am creating a InfoPath form, from 2 SharePoint List. I have 2 data connections to two separate lists, and one XML schema connection.

    The form has a repeating table section and a non repeating table section. In the Non repeating section I have 2 columns a Date picker (Date) and a calculated field (Course). The date reads off the Secondary SharePoint List and the date you select will fill in the calculated field with a Course Name. I have this working no worries. However  in the repeating table section I have another textbox field (Course) attached to the Main Data source, I would like to get the Non repeating Course section default to the repeating table course section and hold on that line. So when selecting insert new row the above row will stay what was chosen, but if the date is changed and a new course is added not to change the top row but to stay in the current row.

    I have been able to fill the repeating table from the non repeating table, but when inserting new line it carries over.

    I hope this makes sense. I have tried using current()/../ but InfoPath 2013 doesn't like the /../

    Any suggestions or help would be very much appreciated.

     Thanks 

     

     

     

     

  • 03-07-2017 04:04 PM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    Hi - I think the rule to set the course on your repeating table may have to go on the repeating table node. See the attached simple sample - I have a rule on the main course field that will only set the first instance, then the rule on the repeating group sets the additional instances when inserted. Hope I understood correctly - save the sample locally, right click, select design & preview to try it out.
    Hilary Stoupa

  • 03-07-2017 04:37 PM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    Hi Hilary, Thank you for your quick replay.

    I don't actually have a drop down date box, I have a Datepicker. So like in your example Select the date and the Course Title will go into the Calculated field next to your drop down. That Course will then flow into the Course in the repeating table. But in my form when I change the date the Course changes in Row 1 as well as row 2.

    I will save the form and send to you if you like so you can see what I mean. 

    I feel I will need to do some Xpath coding just not sure where to start.

    Thanks again 

     

  • 03-08-2017 07:11 AM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    I realized you were using a date picker - I used a dropdown because I didn't want to do anything very complex for a sample & you said you had that part working. :) I'll take a look at your form, but I'm guessing the same approach will work as I used in my sample. I think you may not have noticed the conditions on my rule on the course field?
    Hilary Stoupa

  • 03-08-2017 07:24 AM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    Okay, I see what you are doing - you are using a default value, which is going to update to whatever the latest value in the secondary data source is. So - I removed that, then set this up with similar rules to the rules in my form. I should add, I'm confused by your rules on the query date field - why do you reset the field after the query?
    Hilary Stoupa

  • 03-08-2017 03:20 PM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

     Thank you so much Hilary. That works. Just a matter of changing the date first prior to clicking insert. As for the Query field I am not even sure but I will remove it now :)

    Thank you once again you are a star. 

     

  • 03-08-2017 04:43 PM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    Wonderful, glad you have it working! :)
    Hilary Stoupa

  • 03-08-2017 08:37 PM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

     Hi again Hilary,

     I worked out what the Query using data was for. Basically the conditions won't work with out that query in there. Not sure why but I actually need to leave it there so the form works, unless you havea better Idea :) 

  • 03-09-2017 07:10 AM In reply to

    Re: Infopath 2013 help with prepopulating a repeating table field.

    I was unclear - you definitely need the rule with the query - what confused me was that in that rule, after the query, you had a second action that reset the field. :)
    Hilary Stoupa

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