Consultant's Corner: Using Laserfiche Connector to Fill-Out a Laserfiche Form
This month's CDI Consultant’s Corner article, provided by Software Trainer, Kyle Knebel, walks us through the advantages of using Laserfiche Connect.
Laserfiche Connector is a great add-on that can read information from an application or web page and then use those values to complete an activity, like pre-filling in some fields on a Laserfiche form or searching the Laserfiche repository.
Automatically filling in fields on a Laserfiche Form can save time and help avoid typing errors (typos).
The following article describes the steps needed to make this process work.
Identify your source of information and your target Laserfiche Form
1. First, you want to identify the application and the specific screen that displays the information you are interested in using. This is your source of information.
a. Open the application and navigate to the page where you will normally find the information you want to copy.
2. Open Laserfiche Forms and start the "Business Process" (in other words, the Form) that you want to fill out. This is your target Laserfiche Form application.
In our article today, we are going to use a "Profile" page as our example source web page, since it has a few simple fields that contain data. We will then push this information to the Forms web site.
Configure Laserfiche Connector to capture the source data
This requires that the installation of Laserfiche Connector is customized to include the Profile Wizard. If Connector is installed in Runtime mode, you won't be able to build a new Profile. If you see that there is no Add Profile… option when you right-click on the Connector icon; this will indicate that Connector was installed in Runtime mode. This just means that Connector can run any pre-built profiles, but it won't be able to create any new ones at this workstation. For this article, we will assume that the Profile Wizard has been installed.
1. On the Taskbar, click and expand the hidden icon area on the right side of the Windows taskbar, then right-click on the Connector icon.
2. Click on Add Profile…
3. The Profile Creation Wizard pops-up and you will give the profile a name and define an action. The Profile name can be anything you like, and the action will be Launch a website. Press Next to continue.
4. You'll need to select the application that will act as the source of data. Click the Add Application button.
5. Click and drag the target cursor onto the website page that contains the source data. In this case, we will drag the icon onto the Laserfiche Support Profile page that has already be loaded prior to this step.
6. Once the source application has been registered on the screen, press the Save button. Note: you can use the whole website or just that particular page. A best practice is to use the page only, which is the default setting.
7. Use one or more tokens to capture the information from the web page fields. Each token will match a field on the web page. In our example, we're going to capture three tokens: Last Name, First Name, and Email address. Click-and-drag the target reticle icon onto the source field. Make sure it returns the value that is in the field itself. For example, if you drop the cursor onto the Last name field, it should show my last name of "Knebel" in the token content box.
Make sure to label each of your Token Names, don't leave it as INPUT.
When done adding all the tokens you want, click Next.
Configure Laserfiche connector to load the Laserfiche From and pre-fill the fields
At this point, you are ready to specify the Laserfiche Forms website and pass the values that you previously captured into the Form. This is accomplished by building a URL that includes some parameters, as they are called.
The URL is constructed of the Base URL plus the parameters. The Base URL is obtained from your published Form. The parameters will be added using the token we just defined in step 7.
8. In Laserfiche Forms, go to the Manage page and click on Options beside the process containing your Form. The form URL will be displayed under Link. Click Share next to the form URL to copy the form URL to your clipboard.
9. This URL will be what we refer to as the baseURL on this page. For example, if we want to prepopulate three fields, the URL construction will look like this:
10. In Laserfiche Forms, go to the Manage page and click on the process to open the process. Then click on the Form name to open the Form page designer. Here you can edit each field in order to identify the variable name. The variable name(s) will be used in the URL string we are going to construct. Do this for each field and write down the variable names. Note: A field's variable name is often not the same as the field label. Make sure to use the variable name in the URL, not the field label.
11. Back in the Profile Creation Wizard, we can now specify the "Website" to open. Paste in the baseURL
12. Type in the "?" after the baseURL followed by the first variable and an "=" sign.
13. With the cursor at the end of the URL string, right after the "=" symbol, click on the token picker and select the LastNameTkn token.
The Wizard will display what the encoded URL will look like in the box below.
14. Continue adding your parameters, this time using an "&" (ampersand) to add more field parameters. Press the next button in the bottom right corner to proceed.
15. Use the default settings (or customize to suit) then press the next button.
16. With the "source" webpage open and active, test the Connector profile by pressing TEST the button.
You should see the Form page load, and the three fields should be filled in with the appropriate values, as you see below. Notice the URL has the parameter string, and the fields on the Contact Form are filled in with the values.
17. Press the Finish button to complete the Profile Creation Wizard steps.
Congrats! You've just built yourself a Laserfiche Connector profile to automatically fill out a Laserfiche Form!
Thanks, Kyle! If you have any questions regarding Laserfiche Connector or wish to speak with a CDI professional team member, contact us at email@example.com.