Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Note: I was required to create an external SQL database in order to accomplish what was discussed here. The database was created about 6 months after asking this question and the feature set was "fully" implemented about 10 months later.

I need to create a drop down list that references the repeating section it is part of. That reference will act as a filter for another drop down list.

It seems that there is a "context node" issue with this functionality. The "master" drop down in Section 2 only lists "Section 2"; the "master" drop down in Section 3 only lists "Section 3". I need all sections to be available in the listing.

Here is a link to an example XSN file which demonstrates this. Please let me know if the link does not work; I've rarely used this host.

The goal is that the first drop down selects the "master" repeating section, the second drop down is then filtered to target the sub-repeating section housed within it.

A simple analogy might be a form that has vehicle makes / models. There are multiple manufacturers, each one with multiple models. I want to be able to add both new makes and models but also reference old makes and models to apply changes etc.

Let me add some example pictures to this...

If I create a drop down list "outside" of the repeating section it works perfectly - here is the data structure and location of the "Selector Drop Down Source":

Selector Drop Down outside of repeating table

Here are the options in that selector when two sections have been added:

Options in selector drop down

Now we move the selector location into the repeating table. I am not changing the data source at all:

enter image description here

Now note the available options for the selector drop down when it is embedded in Section 2:

enter image description here

Only that section can be selected! The data source is the same, only the location of the control has changed. Why does this occur? In section 1 only "Section 1" can be selected...

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Only that section can be selected!

It is not the section that can be selected! It is one of strings - dropdown list (DDL) box choice - can be selected as the result of your formula:

concat("Section ", SectionCounter)

for on one of the data subfields SelectorRepeater\SectionTitle (/my:myFields/my:SelectorSection/my:SelectorRepeater/my:SectionTitle)!

When you put the DDL list box outside of repeating section, it does not select a section either! Just a choice in a choice list of DDL dynamically coming from subfield of SectionTitle in multiple repeating sections.

I am not changing the data source at all:

Well, you are changing the context and usage of it.

The data source (structure) for DDL in repeating section is used for storing data in order to create and store repeating items data structure (but cannot be used for lookuping). The one outside of it for lookuping (but not storing) the data outside.

If you want the same list of choices you could have bound instead to external data source (like, for example, sharepoint list field)

Independent, i.e. external data source used for  list of choices of Drop Down List Box in a repeating section

Fig.1. Independent, i.e. external data source used for list of choices of Drop Down List Box in a repeating section

The Title field of a sharepoint list used for content of DDL list of choices

Fig.2. The Title field of a sharepoint list used for content of DDL list of choices

And once again, Infopath operates with XML data for creating XML based forms (visual controls, etc.) and XML data in their data fields providing them for external tools for further processing (like web page or Word docs generation, etc.).

share|improve this answer
    
Is there any way for the choices in the ddl to be generated by the repeating section it is actually in? I need it to update with all the old sections that have been created. The goal is to use this as a filter and auto populate the other fields with old values. –  Shrout1 Nov 10 '12 at 12:54
1  
I dont quite understand. U want to create an endless loop (cycle)! In order for a DDL to lookup for its choice list, one shld create a datasource(DS) outside of repeating section (remember that internal DS stores new and updated items at run-time) binding (looking-up) its values which should be dynamically (at run-time) updated on its own updating. So, a DDL in repeating section will b lookuping ext DS which is lookuping DDL. Whenever an item is added/updated to repeating section, it should notify ext DS to get updated content & the latter msut notify notifier that its own content was changed –  Gennady Vanin Геннадий Ванин Nov 10 '12 at 13:38
1  
And all this is impossible because in order to update an internal (stored in tempalte) DS the template should be republished. I cannot imagine how Infopath XML data form created on the basis of an Infopath XSN template and run on server can update and publish its own template on client in order to recreate itself during its own runtime on server –  Gennady Vanin Геннадий Ванин Nov 10 '12 at 13:43
    
Gennady; thank you for your responses - I will try to test it out and get back to you. –  Shrout1 Nov 13 '12 at 18:01

Looking back at the problem that was originally posted, I can say that I ran into the same problem: create a drop down list that gets data from another source (in my case, a SharePoint 2010 list). Outside a repeater it works just fine. Inside a repeater it only shows a single value after the first instance.

In my case I was able to trace it down to a simple setting: if you give the field a "Default Value" in its field properties, it will only show the full list in the first instance. After that (i.e. after you click "Insert Item"), only the "Default Value" is available as an option in the drop down. Once I removed the "Default Value" from the field, it worked for repeating tables and repeating sections as intended.

Hoping this helps someone else out there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.