0

I have two lists:

  • One has books available (content)
  • and the other is to check out the available content (checkout).

In the content list, I have a field with the images of the book. I have also created a view in the content list that shows only the book images.

In the checkout list/form, I have a field that is set to the Book Title as a look-up field. I would like to add a hyperlink to the book image in the content list that directs them to the checkout list with the Book Title field already populated.

I know how to hyperlink to the checkout form, but is there a way to add a target of some sort to the hyperlink to populate the Book Title field?

1

That's correct, sorry I missed the 'lookup field' in your question.

  • In this case, you can use an additional text column to store the value and populate the lookup Title.
  • Create column, lets say TitleValue in Checkout List. Use this field in the connection to store the value.
  • Use the below URL in the hyperlink, as it is a lookup field, it works with ID and not the field value.

    http://<CompleteListFormURL>?BookTitle=<ID>

  • Now, in the infopath form, create a rule on TitleValue Field. When the field changes, set the lookup field equals to TitleValue field (it will populate based on ID).
  • Hide this TitleValue in the form, as it is not required to be displayed.
0

Have the checkout form as InfoPath.

  • Open ListTools -> List -> Customize List -> Form WebParts -> New Form.
  • Add Query String URL Filter. Edit the WebPart and give a name for Query String Parameter Name lets say BookTitle.
  • Use the dropdown of WebPart properties, to add the connection to InfoPath WebPart Book Title column.

Now in the hyperlink, you can use

http://<CompleteListFormURL>?BookTitle=<TitleColumn>

This would open the form with the field populated.

  • Thanks! I'm still having some issues getting them to connect. When I make the web part connection in the form and go to do the connection, "Book Title" doesn't show up in the list to connect to QueryString. Is this because it's a look up field? – Brian Aug 8 '16 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.