Open 2 forms (one for data entry, one to view PDF)

Open 2 forms (one for data entry, one to view PDF)

Comments

  • Is there a way to load up a document viewer in a separate window, and also have a form open at the same time for data entry?
    Currently, we are storing PDFs in our process folders, and would like to view the associated PDF in the separate window.

    The goal is to allow the end user to take advantage of a multi-monitor setup with the PDF document on one monitor and the data entry form on the other.

  • [color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]Attached is an example export of what should accomplish this (built in v5.8).\r\n[/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]The export demonstrates a form that, when a button is pressed, opens a new window displaying a PDF associated with a given Process Folder, allowing data entry to the form while viewing the PDF in a separate window.[/font][/color]\r\n\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]There is no true way to have two active forms open at the same time, but this example achieves a similar effect.[/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]It does so by opening a page whose only purpose is to contain a \"Flow Run Part\" component, the target flow of which will contain a form with a \"[/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]document[/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif] [/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]viewer\"[/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif] component. \r\nThis way, the form can open this page in a separate window that only displays the PDF.[/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]To open the page from your form you must use an [/font][/color][b]Open URL Button[/b][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif] form component, where the URL input would be the URL of the page(this can be found by simply opening the page and copying from the URL bar).[/font][/color]\r\n\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]The next requirement is to dynamically acquire a PDF that is already attached to a given process folder to be displayed in the new window.[/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]This is done by passing the Process Folder ID of your process folder as a URL parameter to the \"Open URL\" button's target URL by merging the URL string input with the Process Folder ID. [/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]The \"flow run part\" flow can then use a [/font][/color][b]Get Page Variable[/b][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif] step to grab the Process Folder ID parameter from the URL, and a [/font][/color][b]Get FileReferences in Folder [/b][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]step to use the Folder ID to acquire the process folder's FileReferences, which provides the PDF file that the document viewer can display.[/font][/color]\r\n\r\n[b]Notes: [/b]\r\n--[b] [/b][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]In this example[/font][/color][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif], the URL for the \"flow run part\" page is hard-coded as \"localhost\". If you need the base URL to be dynamic (so that this works regardless of the machine/ server) the [b]Open URL Button [/b]form component has a \"Relative to Base URL\" checkbox. If you use this, you can delete the base URL from the form input's \"Merge Plain Text\" editor.[/font][/color][b]\r\n[/b][color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]-- To achieve the \"borderless\" (hiding Decisions UI) effect on the new window I added a \"&chrome=off\" parameter to the URL. Feel free to remove this.[/font][/color]\r\n[color=rgb(34, 34, 34)][font=Arial, Helvetica, sans-serif]-- I merged the &Process%20Folder%20ID= parameter string to the URL string because this is the URL encoding equivalent of the text, \"Process Folder ID\

Sign In or Register to comment.