Pages

Monday, June 18, 2012

Populate Drop Down Lists in InfoPath from a SharePoint List

Drop Down Lists in an InfoPath Form Connected to a SharePoint List


Here is the good, the bad and the downright ugly of the drop down list function in InfoPath.

Let's start ugly.

Here is a drop down list from a SharePoint List.  This is simply a list of 100 recent forms:

There is a form missing from the list - how can this happen?  Also, how many items should you show in the Drop Down List.



Firstly, how do you control how many items will appear in this drop down list?  You will need to create a view in SharePoint that has filters on it - either filter the items in the list by date, author, not older than 30 days, not approved (you set the filter criteria based on your needs) or organise the SharePoint view to show the list in batches.  Filtering can also done within InfoPath itself.  Note that you have the list showing, for example, the first 100 items, then this list will only show the first 100 items, even if the SharePoint list view allows you to navigate through all the items stored in the list 100 at a time. That is the easy part.

But where is the missing form?  You will see that it is not missing as such, just that the field from SharePoint - which happens to be used to create the drop down list in InfoPath - has been left blank. 

Either make the field compulsory within the form, or set the list up so that this field cannot be blank by combining values that are automatically created with the form (Date, modified date, user, etc) in a title field.

Tuesday, June 12, 2012

InfoPath Errors - A Few Clues

InfoPath Errors can be vague and unhelpful.


Here is a common InfoPath error message and the steps you take to fix it.

InfoPath cannot open the following file.  Your user name or group membership cannot be verified because the form's security settings do not permit it.

It would be reasonable or logical to assume that the necessary tweaks need to be done in the form's security settings. 

In this case, the form is set to Full Trust.  But the fix is much easier.

Simply change the Local Security Settings in Internet Explorer.



Choose Internet Options, Local intranet, and then Advanced to add your intranet to trusted sites.




If your intranet is not listed in the trusted websites list, add the website to the zone by typing it in and clicking Add.

 

I wish all the InfoPath errors could be resolved so easily.