Repeating Section - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Section

Last post 07-24-2017 04:45 PM by Hilary Stoupa. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-11-2017 12:18 PM

    Repeating Section

     This is a two part question, I have a form with a repeating section, that repeating section will copy its contents down to the repeated section. one of the fields in that section needs to auto increment each time it is repeated which I did using the max +1 function. it works fine if it is just a number, but this field is being used for serial numbers that have a dash xx-xxxx. the max +1 does not work when there is a dash in the number. how can I have it just auto increment the numbers that come after the dash. second part is I may need to enter up to 100 items at one time each have all the same data just that the serial number changes. instead of having to click the "insert section" 100 times is there a way to enter a number into a field in the form that when the insert function is activated it will insert 100 sections with the serial number incrementally increasing by one for each section? I would like to be able to do this without having to do any advanced coding. can this be done?

  • 07-13-2017 08:00 AM In reply to

     Yup. I've attached a sample showing one approach. I've added rows by default to the repeating group (under Data > Defaults in the ribbon) then logic to show or hide the rows. I use a concat formula with substring functions to handle the serial number - be sure you enter xx-xxxx as the format in the first field when you try this. Save the sample form locally, right click and select design to open in design mode, and from there you can preview and give it a try. There are helper fields in the repeating section to handle some of the logic.

    Hilary Stoupa

  • 07-18-2017 08:50 AM In reply to

     thanks for getting back with me on that. that looks like it should work for me, the only thing thought is that I need to be able to do more than 20. is that just the way you set the form up and something that can be changed or is that internal to the software. also I need the serial number to be in the format of for instance 16-0010. when the section repeats and copies the SN down is turns it into 16-10. how to I make it keep the zeros. also how do I add the supporting fields into a form such that they will not be treated as data? thanks again.

  • 07-18-2017 08:57 AM In reply to

    I only added 20 rows to the default - Under the Data tab in the ribbon, look for the Default button and you can add more. Oh, zero padding is fun, I'll update the sample later today with that. I don't understand your last question - can you clarify?
    Hilary Stoupa

  • 07-18-2017 09:37 AM In reply to

     Ok thanks, I will take a look at that. I look forward to the solution. So what I am asking is you mention that there were some helper fields in the form, and when I look in the list of fields in advanced view I see that they are gray in color rather than white like the normal fields. how to you add these helper/supporting fields? these fields are not submitted as data for the list.

  • 07-18-2017 09:39 AM In reply to

    Wait - this is a SharePoint List form? Or a regular InfoPath form?
    Hilary Stoupa

  • 07-18-2017 09:52 AM In reply to

     so I figured out the optional attribute field (field attribute) deal. I can add that when creating a blank from or form library form but I don't see how to achieve that in a SharePoint list form. can this be done in a list form?

  • 07-18-2017 10:00 AM In reply to

    In a list form, you'd have to have a column for these helper fields - you could just not display it on the list views, I suppose. It is just that with repeating data, we need a field inside the repeating group to act on each item in the group. Make sense?
    Hilary Stoupa

  • 07-18-2017 12:11 PM In reply to

    Here's an update that allows zero padding in the last 4 chars of the serial number
    Hilary Stoupa

  • 07-18-2017 12:12 PM In reply to

     ok, I think I follow. I will have to play around with it a bit more and see if I can figure it out fully. not sure how to go about getting it to work with a list based form but you have set me on the right track.  thanks

  • 07-18-2017 04:08 PM In reply to

     well I have been playing around with and seem to missing something. wondering if you might be able to take a look at what I have and see where I went wrong. much appreciated

  • 07-21-2017 08:13 AM In reply to

     I think the condition on your setvalue with the preceding sibling formula should be:

    count(../preceding-sibling::my:SharePointListItem_RW) <= ../preceding-sibling::my:SharePointListItem_RW/my:NumRecAdd[. != ""]) 

    Hilary Stoupa

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

      I tried putting that in and it is still showing all of the sections when I preview the form instead of hiding them all. I don't know what I am missing.

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

    I had an extra paren on that formula, sorry about that. Try the attached copy. Couple of things - the button needs to be outside the repeating section to act on all instances of set value. The default data needed to have display set to false for all instances except the first.
    Hilary Stoupa

  • 07-24-2017 11:21 AM In reply to

     Awesome thank you so much. That works. Is there a way though to make it that no matter how many digits come after the "-" in the serial number that it will automatically use that number of digits. there are times that we may have xx-xxx and sometimes xx-xxxx. and just a quick clarification, if the sections are hidden they will not be submitted to the list correct?

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