How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

14
www.BRAINSPIRE.com Custom Software Solutions How to pull in SharePoint lookup “Additional Fields” into InfoPath form

Transcript of How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

Page 1: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

How to pull in SharePoint lookup “Additional Fields” into InfoPath

form

Page 2: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

►NOTE: The solution as it’s listed here is for EDIT mode forms. If you would like this to work in READ mode forms, follow the same instructions below but then you will have to do an additional couple of steps (listed at the bottom of this post).

►When creating an InfoPath form for a SharePoint list, you may need to bring in SharePoint lookup fields into the form.

►In this example, I have a list called “KPI Actuals” and in its List Settings (below) you can see I did a lookup to a list called “KPI” and I brought in some additional fields from this list, such as KPI Category, Description, Owner, Team, etc. In this tutorial, I will lead you through how to add the “KPI: Team” additional field to an InfoPath form. (See next slide)

Page 3: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

Page 4: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

►Notice on the next slide, in our InfoPath form editor, we see “KPI“, but we don’t see any of the additional fields outlined above such as “KPI:Team“.

Page 5: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

Page 6: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

►Follow these instructions in order to add lookup “additional” fields to your InfoPath form.

1. Add a new data connection

Page 7: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

2. Add… / Receive Data/ SharePoint library or list3. Select the list that you have done the lookup to (Target list). In my

case, the list is called “Marketing KPI Definitions”. Choose all the fields that you wish to bring in from this list. Name the connection, and click finish.

Page 8: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

4. Add new Calculated Value to form

Page 9: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

5. Fx / Insert Field or Group… / Show advanced view6. Select new data connection from dropdown7. Expand dataFields8. Select field you want to bring into form, do NOT click OK9. Click ‘Filter Data…’ at bottom of window

Page 10: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

10. Add…11. Select the lookup ID from the Source List in the first dropdown – in my case

“ID”12. Click ‘Select a field or group…’ from the dropdown on the right.

Page 11: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

13. Select the ‘Main’ data source from the top dropdown.14. Select the lookup ID as it is named in the Target List (‘Main’)

Page 12: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

15. Click OK / OK / OK / OK / OK / OK►Repeat this process for each lookup “additional” field that you wish to bring

in. I now have the KPI:Team field on my form.

Page 13: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Custom Software Solutions

►This solution should work in EDIT mode. However, if you would like the additional fields to appear when you view the InfoPath form in READ mode, follow the steps below:

►If you want the fields to display when you are in Read mode, you will need to set up an InfoPath Rule on “Form Load” that sets the lookup field equal to the lookup field’s value. This post shows you where to find the Form Load rules:http://www.bizsupportonline.net/infopath2007/infopath-basics-how-to-populate-form-when-opened-loaded.htm• Make a new form load rule and set the condition to something like “None

– run when form opens”. • For example, let’s say you used “ClientName” as the primary lookup field

for List B (so all the additional fields are brought up when you select the ClientName). In the rule, under “Run these Actions”, set the field “Client Name” equal to ClientName’s value.

Page 14: How to Pull in SharePoint Lookup Additional Fields Into InfoPath Form

www.BRAINSPIRE.com

Contact Us

 Your Trusted Partner in Software Solutions

Our ServicesCustom Application Development

Data & Business IntelligenceApplication Integration

Mobile DevelopmentPortals & Websites

Brainspire Solutionswww.brainspire.com

[email protected]