Use a SharePoint list for a shrinking list in an InfoPath repeating table

See an InfoPath demo of how you can use a SharePoint list to populate a drop-down list box in a repeating table on an InfoPath form and then have items disappear from the list whenever a new row with a newly selected item is added to the repeating table.

A shrinking list in an InfoPath repeating table is a drop-down list box that is located in a repeating table control on an InfoPath form from which items are dynamically removed as rows are added to the repeating table and as items are selected from the drop-down list box.

InfoPath 2010 demo video transcript:

Here I'm in SharePoint 2010, where I've got this RunningShoes SharePoint list that contains a list of running shoes. The idea is that I want to populate a drop-down list box control that is located in a repeating table control with this list of running shoes and then offer users the ability to select a running shoe only once from the list of running shoes.

I've already published an InfoPath form template to this SharePoint form library, so if I click Add document to add a new form, you'll see that as soon as the form opens, it will display the repeating table control with one row and a drop-down list box in it, and the full list of running shoes.

I can then select a running shoe from this list, for example New Balance, and then when I click Insert item, you'll see that New Balance has disappeared from the list. I can then select a second one, for instance Ariel, and then again you won't see Ariel or New Balance in this list.

I can also go back and select another running shoe. For instance, if I select Wave Alchemy here, it should disappear from the other two lists, and New Balance should appear in the other two lists again. We can check that. Here New Balance is present and Alchemy is gone. And here the same thing.

You can continue inserting items like this. And as you see, the list will continue to shrink, until you reach the last item, upon which the Insert item command will disappear, but you are still able to remove a row. For instance, I can remove ProGrid Stabil CS, and then the Insert item command will appear again, so I can add a new row, and then select ProGrid Stabil CS again.

 


Related InfoPath Articles:

 

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.