Modifying external list forms with infopath 2010

 Uncategorized.

SharePoint 2010 Lists and Libraries contain a new style of form called a Dialog which allows you to view and edit the metadata of a list or library.  The forms can be modified by using InfoPath 2010 allowing you to provide validation, conditional formatting, calculations on fields and many other operations. You can modify the form using InfoPath 2010 by clicking the command on the ribbon as shown below:

image thumb 1 Modifying external list forms with infopath 2010

Many people believe that you cannot modify the forms for an External List.  There is very good reason to think that, since the Customize Form command does not display for an External List.  The Customize List category on the list ribbon for an external list looks like the below:

image thumb 2 Modifying external list forms with infopath 2010 

There is another way of modifying the forms for list.  You can navigate to the List Settings page and click on the Form Settings link from the General Settings section as shown below.

image thumb 4 Modifying external list forms with infopath 2010

Unfortunately, clicking this option for an External list returns an error to say that InfoPath does not support customizing the form used for this list.

image thumb 3 Modifying external list forms with infopath 2010

So how do you modify the forms?

1. Choose Site Actions, Edit in SharePoint Designer to modify the current site in SharePoint Designer 2010.

2. Click External Content Types from the left hand navigation pane in SharePoint Designer.

3. Click the External Content Type for the External List that you want to modify.

4. Click the Create Lists and Forms command on the ribbon.

image thumb 5 Modifying external list forms with infopath 2010

5. A dialog box will display asking if you would like to replace the InfoPath form for the selected External List or create a new External List.  In my example I am going to replace the InfoPath form for the External List as shown below. Click Ok.

image thumb 6 Modifying external list forms with infopath 2010

6. Click External Lists from the left hand navigation pane.

7. Click the External List you just created or modified.

8. Click the Design Forms in InfoPath command on the ribbon.

image thumb 7 Modifying external list forms with infopath 2010 

9. The Form will display in InfoPath.

image thumb 8 Modifying external list forms with infopath 2010

10. Choose the Page Design ribbon and select a page design as shown below:

image thumb 9 Modifying external list forms with infopath 2010

11. Click the Company Name field and set the style to Title

image thumb 10 Modifying external list forms with infopath 2010

12. Make the Phone number required by clicking the Phone Number Field and choosing the Home ribbon.

13. Click Add Rule, Is Blank, and then Validation Error to add a rule.

image thumb 11 Modifying external list forms with infopath 2010

14. Set the error message to “Phone number cannot be blank”.

image thumb 12 Modifying external list forms with infopath 2010

15. Click the save icon to save the form to the file system.

16. Publish the form to the list by clicking File, and then Publish, and then External List.

17. Click the Open this form in the browser link to navigate to your External List.

image thumb 13 Modifying external list forms with infopath 2010

18. Test your changes by modifying an item in the External List

image thumb 14 Modifying external list forms with infopath 2010

This is a simple example of how to modify the External List form in InfoPath 2010.  You can of course do a lot more while in InfoPath. 

I hope this helps.

<Brett/>

  1. Hi Brett,

    Is there also a way to do the same in code? I want to replace the default web part with a custom one. I can acheive this in SPD, but in code it won’t do this unfortunately.

    Kind regards, Jasper

     
  2. I saw you present this little work around at the NZ SP conference – saved me heaps of time – many thanks!

    Rich

     

Leave a Comment

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

*