Hi,
I could imagine the following approach ...
- Two Lists (List1 and List2)
- List1 has a column of type "number" called "List2Id" (containing the Item-ID instead of an hyperlink)
- List2 has a couple of entries, List one has at least one entry where the hyperlink is pointing to an item in List2
When I open the "List 1 - Foo" item I get the following form:
This would turn into a corresponding PDF.
To achieve this result I added a listitem-control to the form pointing to "List2" and using the value from the column "List2Id".
I would further only display this control when the form is in Display-Mode and the List2Id actually contains a value.
Similar I would only show the List2Id-Control when the form is in Edit- or New-Mode.
That'll work , It just matters how custom your form is on List2, can it be recreated in the List1 form? Then you can show/hide just like henning describes. Its a very good solution.
You will have to have a single form and print from that form only.
What happens if you use a page viewer control? That would be the only other way to embed the List2 form. I think you will get the other sharepoint items (nav and ribbon) in the view, so it's not ideal.
The PageViewer was my first thought - although not the best
You could use the Hyperlink-column easily with the pageviewer, just point the pageviewer to the value of the hyperlink column (in my case I called it "List2Link" and append "IsDlg=1" to hide to the quick-launch as well as the top-nav.
The result could look like this:
However - the generated PDF seems unexpected:
I would guess, the print-to-pdf action did not expect an Iframe here ...
That's interesting, didn't think that would happen.
you should short blog that feature of using isdlg. I would have overlooked that.
I appreciate the feedback and I'll try implementing this to see if it'll satisfy my requirements.
For some context here on what I'm trying to do is as follows:
I have 1 List that has Events that occur throughout the day. When an Event Occurs it may or may not have 1 or more corresponding Incidents that are reported in a 2nd List. The Incidents List may have Photos embedded in a Multi Text Field/Column in the 2nd List. When a Incident item is associated to an Event the end user would create a Link in a column on the Events List Item that points to the Incidents Items.
I was asked if I could develop a solution where when opening up the Events List Item and I click on the 'Print to PDF' button on the Nintex Form that the Event item and any associated linked Incident Items and their photos would all show up on the PDF file that is created.
Note: I'm always amazed at the great feedback I get from the Nintex Community and greatly appreciate everyone who has taken time to respond to my question!!
Thanks again and I'll provide an update as to whether this will work for me once I give it a try.
Frank Cheney
Me neither. I still don't really get why this is actually happening.
I marked Henning's answer as correct as I followed the procedure that was provided and when opening up the Nintex Form for the 1st List Item that is Linked to the 2nd List Item I saw both list items on the Nintex Form as well as the columns that had photos inserted. I then did the 'Print to PDF' and it worked like a charm.
One other challenge I need to determine is how I can autosize/crop photos etc so they aren't huge in size. Anyone have any ideas on that challenge?
Thanks again for the help!
Frank Cheney
Awesome! SharePoint provides image renditions that it can apply to images automatically. I use them all the time for page content and in display templates.