How to Link to Lookup Column In Infopath Form


  • Sorry if this has already been answered elsewhere, but perhaps I'm using the wrong search terms I'm unable to find a solution. I'm trying to link two tables via a lookup field. In the default SharePoint form clicking on the item in the primary table prompts a dialog box where it Hyperlinks to the item in the secondary table, but once I publish it to Infopath, my link becomes just text. Is there a way to make the Infopath point to a Hyperlink in the same manner it would on a default form? Any help on this would be great!

    Friday, August 29, 2014 6:34 PM


  • Hi,

    According to your post, my understanding is that you want to make the lookup field as hyperlink in the display form after customizing in the InfoPath.

    Per my knowledge, there is no out of the box way to accomplish this with SharePoint.

    As a workaround, you can insert a hyperlink in the form to instead of the lookup filed to link to the primary list.

    I recommend that you can follow the steps as below to implement it in your environment.

    1. Open the list in your site, go to the “List Tools” ribbon, click “Customize Form” under the “List” tab.
    2. Add a Text Box Control in the list form as field2, right click the Text Box field, click Text Box Properties to set Default Value as below:
    3. Go to “Insert” tab, click “Hyperlink”, in the “Display” field click “Data source”, select the Text Box field in the Main Data Source, then the value is as below: dfs:dataFields/my:SharePointListItem_RW/my:field2.
    4. In the “Link to” field, select “Data source” again, concatenate the Display Form page of the lookup column’s item in the primary list with ID equal to the current lookup column field’s value, type like: concat("http://Site name/Lists/Primary List/DispForm.aspxID=",dfs:dataFields/my:SharePointListItem_RW/my:Lookup).
    5. Select the Text Box control, click “Form Load” in the DATA tab to add a new rule for it.
    6. Click “New”, select “Formatting”, add Condition like: “the field is not blank” or “the field is blank”, and check “Hide this control”.
    7. Publish the list form, click modify view in the list to hide the Text Box field, test if it works in the list.

    The current item’s Display Form is shown as below. You can click the Hyperlink to open the related item.

    Best Regards,

    Linda Li
    TechNet Community Support

    Tuesday, September 02, 2014 8:10 AM