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

I made a custom list in SharePoint(2010) and then created an infopath form based on that list. I created a new page in my SharePoint publishing site and added an infopath webpart that looked at my list/form. Everything works great.

I have a list with a column that accepts multiple values (a "choice" type with dropdown) and wish to add new choice options thats is available on an InfoPath(2010) webpart form.

When add a new choice value it won't be visible to the infopath webpart form. I've i don't use the infopath webpart form, it show all(incl the new adde value). The only solution that i found is to republish the infopath form.

I first need to republish the InfoPath to make it visible. Is there an other way?

share|improve this question
add comment

1 Answer 1

One should update template on Sharepoint server to make its changes visible/available to Sharepoint, i.e through Infopath Form Web Part.

If you want to change choices without changing the template then you should define choices outside of the template itself. So change (in Drop Down List Box Properties) the List Box Choices from "Enter choices manually" to "Get Choices from an external data source" having configured the "Data Source:" (Add... button). One of the easy variants is to create and use a sharepoint list column (in another or the same sharepoint list) for this.

Drop-Down List Box Properties - Get choices from an external data source

Fig.1. Get choices from an external data source (in Drop-Down List Box Properties). I've used here as datasource the Title field of another (could be the same) sharepoint list called Dropdown

Answer to comment:

You did not provide details how you created the Infopath form but most probably, if you created the form by pressing Customize Form button, the choices were embedded in the form template itself

Drop-Down List Box Properties - Enter choices manually

Fig.2. Enter choices manually (in Drop-Down List Box Properties).

Which are filled indirectly through embedded into Infopath template file choices.xml, Fig.2a

Uneditable locked Choices data connection in Infopath template auto-generated from sharepoint list column of type choice

Fig.2a. Uneditable locked Choices data connection in Infopath template auto-generated from sharepoint list column of type choice

That this file choices.xml is embedded in template one can make sure by exporting source files (in Infpath Designer 2010, File > Publish > Export Source Files)

And to enable choices to change independently on Infopath template in order to avoid template republishing for updating (without Infopath template changes through updating embedded choices.xml), you can get/link choices from(to) an external data source. There are variants, but the most quick and simple one is to create and use another sharepoint list for this (cf. Fig.1)

Update 2:
After changing data source of drop-down list box, make sure to delete old manual defaults in Infoapth template. In Infopath Designer 2010, Data tab > Default Values button with green checkmark (in Sharepoint Form Data section on ribbon)

Delete remaining embedded defaults

Fig.3. Delete remaining embedded into template defaults

So, having created and filled Title colum in Dropdown sharepoint list

Fig.4. Field Title of Dropdown Sharepoint list

Fig.4. Field Title of Dropdown Sharepoint list

linked as data source of choices in drop-down list box Choicesss (with underlying data field with the same name) in Sharepoint List Choices the choices are:

Fig.5. Choicesss drop-down list box in Infopath Sharepoint List Form for sp list Choices

Fig.5. Choicesss drop-down list box in Infopath Sharepoint List Form for sp list Choices

or what is the same, here is a web part aspx page with that inserted Infopath web part

Fig.6. WebPart ASPX WebPage with Inserted Infopath Form Web Part

Fig.6. WebPart ASPX WebPage with Inserted Infopath Form Web Part

Fig.7. Infopath Form Web Part Properties

Fig.7. Infopath Form Web Part Properties

Fig.8. IP Web Part ASPX WebPage after Dropdown sharepoint list update

Fig.8. IP Web Part ASPX WebPage after Dropdown sharepoint list update (without Infopath form template republishing)

Fig.9. Updated Sharepoint list Dropdown

Fig.9. Updated Sharepoint list Dropdown

Reply to comment:

I think it is the default data connection 'Choices Data Connection'

Link photo 1
Fig.10. "Link photo 1" from comment

"Link photo 2" from comment
Fig 11. "Link photo 2" from comment

By default it get's hes choices from choices.xml – mchello

I do not know how you get to situation on Fig.12 since I observe it as in my Fig.2 and what is the sense of it.
But the point is that in both mine and your situation there is embedded into Infopath template file choices.xml and in order to avoid the necessity to update choices of drop-down list box by template republishing, I proposed a workaround of of having data source directly from a sharepoint list column of type "Single line of text"

Have I answered your question how to add/update drop-down list box choices in Infopath template (which is the same as in a webpage with Infopath Form Web Part from it) without necessity to republish the template?

share|improve this answer
    
Hi Gannady, Thanks for you reply. I made a custom list in SharePoint2010(with SharePoint Designer) and then created an infopath form based on that list. When adding a new value in SharePoint Choice column it won't automatically update the form in the 'InfoPath Webpart Form'. When i open the form without using the 'InfoPath Webpart Form' the new added value is visible. –  mchello Oct 3 '12 at 8:56
    
See updated answer –  Gennady Vanin Novosibirsk Oct 3 '12 at 9:23
    
By default SharePoint makes a 'Choices Data Connection' in InfoPath that is connected to the SharePoint columns. But im not able to make it visible true an 'InfoPath Webpart Form'. –  mchello Oct 3 '12 at 9:26
    
After you have changed the data source for choices to another data connection/source (e.g. linked to sharepoint list), you should publish ONCE template to update that change in sharepoint. After that the choice changes will be caught from another sharepoint list without further template publishing (no tamplate changes will happen after changes in of "choices" sharepoint list) –  Gennady Vanin Novosibirsk Oct 3 '12 at 9:47
    
Now try to add the 'InfoPath Webpart form' on you page, and add an new value in your SharePoint column. You will see that is won't update. –  mchello Oct 3 '12 at 10:49
show 5 more comments

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.