Auto Populating a Drop-Down field using a repeating table. - InfoPath Dev
in

InfoPath Dev

Auto Populating a Drop-Down field using a repeating table.

Last post 07-02-2016 05:33 AM by jrnava713. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-29-2016 12:27 PM

    Auto Populating a Drop-Down field using a repeating table.

     I am trying to auto populate a column in a repeating table using a drop-down field containing days of the week (Mon-Fri). I already have a rule using preceding-sibling function to open just 5 rows. I have defaulted the list to Mon and now I would like to move to Tuesday when I insert the next item and so on until I insert Friday. I would like to do this without code. I am using InfoPath 2010 and publishing the form to SP2010, however, soon we will migrate to SharePoint On Line so I want to keep InfoPath clean (out of the box solutions). Any ideas how to do the auto populate so my customers are happy?

    Juan R Navarro
  • 07-01-2016 04:23 PM In reply to

    Re: Auto Populating a Drop-Down field using a repeating table.

     See the attached sample - I used an XML file for the days of the week data and a filtered default that leverages the count of preceding siblings. :)

    Just in case you didn't know this - save the file locally, right click and select design to open in design mode. 

    Hilary Stoupa

  • 07-02-2016 05:33 AM In reply to

    Re: Auto Populating a Drop-Down field using a repeating table.

     Thank you so much for your sample. I used a similar approach but used a count variable field to do so. I built this variable to restrict the number of rows to be inserted using the preceding sibling function then I used a rule to say that if count = 1 then week day = Monday and so on.  Count--> count(preceding-sibling::*) + 1, then I used a formatting rule in the repeating table to do not allow to insert more items if count => 5. Then converted my Days field to text and used Count to provide day (defaulted Days to Monday to avoid blank lines) values ( count = 1, Day = Monday; count = 2, Day = Tuesday; etc).

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