SharePoint 2013 + InfoPath - How can I add an HTML link to the current item? - InfoPath Dev
in

InfoPath Dev

SharePoint 2013 + InfoPath - How can I add an HTML link to the current item?

Last post 12-05-2014 02:11 PM by cotton_gin1. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-11-2014 07:39 AM

    SharePoint 2013 + InfoPath - How can I add an HTML link to the current item?

    We have a request to make the link to the current item being edited show up on the web form. We don't fill out the forms with InfoPath. We only use SharePoint web forms. I'm looking for a way to add a link to the form so when the submit data to email recipients function takes place there is a link in the email that goes directly to the view or edit form view for that one item. I've got the link to the entire list, that one was easy, but we need to have a link to the current item being editing in the web form. This is not using workflows to send email, it's all through infopath forms and we don't plan on switching because we have formatting and lots of other configuration completed on the forms already. I am out of ideas and need your help! Do you have any suggestions? Thank you for your time!
  • 11-19-2014 02:38 PM In reply to

    Re: SharePoint 2013 + InfoPath - How can I add an HTML link to the current item?

     Hello cotton_gin1,

     This is a function that can be configured in your forms logic, but first there's a few steps to set up:

    1. This method only works with InfoPath Forms (Not SharePoint lists)
    2. Make sure that you are using custom logic to submit the form
    3.  Make sure that you are capturing the FormName used in the submit data connection (this is how the link is created)

    Once you have those items set up, you can proceed. In the Submit data connection when we utilize a form name field, we are capturing pieces of data we can use to re-create the form link in the form. If you open an existing form, you'll notice that the form name is part of the URL. Here is an example:

     

    https://qshp2013.formsboard.com/Bre/_layouts/15/start.aspx#//Bre/_layouts/15/FormServer.aspx?XmlLocation=/Bre/Locations%20Management/i_0_.w_autonomysystems_dlambatin-2014-07-25T02_38_57.xml&ClientInstalled=true&DefaultItemOpen=1&Source=https%3A%2F%2Fqshp2013%2Eformsboard%2Ecom%2FBre%2FLocations%2520Management%2FForms%2FAllItems%2Easpx 

    The bold segment identifies the form name. Next, you would set up an action on your FormName field to set the url value whenever the FormName changes (which should only be when the form is created)

    The formula would look something like this:

    concat(https://qshp2013.formsboard.com/Bre/_layouts/15/start.aspx#//Bre/_layouts/15/FormServer.aspx?XmlLocation=/Bre/Locations%20Management/", FIELDWITHFORMNAME, ".xml&ClientInstalled=true&DefaultItemOpen=1&Source=https%3A%2F%2Fqshp2013%2Eformsboard%2Ecom%2FBre%2FLocations%2520Management%2FForms%2FAllItems%2Easpx ") 

    Thanks!
    Bre


    Bre Huston | Project Manager

    Qdabra® Software / InfoPathDev.com / FormsQuo /  877.544.2389 main / 425.318.7843 direct

    Business Process Automation for Everyone – Streamline data gathering to turn process into knowledge.™

     

  • 11-24-2014 06:39 AM In reply to

    Re: SharePoint 2013 + InfoPath - How can I add an HTML link to the current item?

    Thank you for your response! I will try to implement your suggestions.
  • 12-05-2014 02:11 PM In reply to

    Re: SharePoint 2013 + InfoPath - How can I add an HTML link to the current item?

    Update for anyone else who ran into this scenario. I managed to get this working so here is what I did.

    1. Create a Retrieve data Type Data Connection that pulls information from the SharePoint site and select the same list. Select the ID field and any other fields that you may need to match against. Disable: Store a copy of the data in the form template. Enable: Automatically retrieve data when form is opened. I suppose you could create a button or organize some Rules to query right before submitting the form (in our case we needed the link in the emailed copy of the form so this likely would work).

    2. Create a new field to store the link to the new item. Add the field to the form.

    3. Open the Properties of the Control and specify the default Value using the concatenate function. Here is our formula: concat("https://abcsolutions.com/TIS/PMO/_layouts/15/listform.aspx?PageType=4&ListId=%7B72344A00%2D08D6%2D46C3%2DB076%2DD9FBC939F486%7D&ID=", ID[Title = Title], "&ContentTypeID=0x0100C8C5FAB22D95044582CC7B99089FD11F") Note: ID[Title = Title] in the formula is where we insert the ID Field of the new item. Click Insert Field or Group > Select the Retrieve Data Connection you created earlier and expand myFields>dataFields>d:SharePointListItem_RW and select ID. Then click Filter Data... I had to match the Title field of each item from both Data Connections (primary and secondary, the one we just added) so I knew the ID field it was going to pull was the correct one and not the first ID it came across.

    Maybe some of these steps are not necessary, but it worked for me so I'm not going to fiddle with it anymore! Hope this helps someone!

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.