In this article we’ll discuss how to set up your own web buttons. Web buttons can be complicated, so a more advanced user should take on this task. To begin, open up a case. Select the questionnaire on which you wish to add the web help button. In this exercise, we’ll use a web search questionnaire.

Once on the questionnaire, press control alt M. This will put you into the maintenance mode. Please note, authorized users can only access maintenance mode.

Left click on the yellow background, at the point you wish to place the new button.

This will bring up the Questionnaire item setup screen. First, select the type of filed format to create. In this exercise select “Command Button” format.

Now, specify the display name for the web button, in the label box. As a suggestion let’s call it “Yahoo Search”.

Move to the command box, to specify the command to execute. Interactive web buttons utilize a special program called pphttp.exe. This is located in the bin folder of the Perfect Practice directory. You can browse to the bin, which will place the actual path in the command box. Locate pphttp.exe, select it, and click open.

Note the path to pphttp.exe, is now in the command box.

You can also use variables. For example %remote% will automatically look at your remote path. In this example we’ll type in %remote%, in place of the actual path. Before we can proceed, we must first specify our parameters in the pphttplookup.ini file. Navigate to the remote bin and open up pphttplookup.ini

This file contains examples of web button setups.

We’ll add a new section, called Yahoo Search. Make sure to put the section title in brackets like the others. Under the new section, we’ll specify the queries we wish to run with this web button. We also need to specify where in the URL, to insert the queried information. We’re creating a basic web button that is going to search for a piece of information located in a specified field.

Most queries for web buttons are going to look very similar. If you know how to write queries, and know which tables you need, you can write your own query. In this instance, we’ll just copy a query from one of the examples and paste it under the Yahoo Search section we created.

After the query is in place, we have to tell it which URL or website to link to, and where to place the information returned by the query. To determine which URL to specify, you must first go to the website for which you’re setting up the button.

In this case, we want the button to search, so we’ll type something into the search box and click search. You’ll then want to copy the web address into the Yahoo Search section of our INI, we’ll type “URL=” and then paste the web address that we copied. We’ll then locate the text that we searched for, and highlight it.

Next we need to replace the search term that we searched for and replace it with a variable. The variable we’ll use is “%R1%”. This variable tells the program to place the information returned from query 1, at this location in the web address. If we had more then one query we could specify multiple variables, such as “R2” equals query 2 and “R3” equals query 3 etc.

At this point, the setup for the INI, is configured for the Yahoo Search web button. We’ll now save the file, by going to file and clicking save.

Before we go back to the web button setup, we need to determine the field number, of the field from which we wish to pull data. To do this, enter maintenance mode by pressing the “Control+Alt+M” key. Then right click on the field from which you wish to pull data. Look for the field number in the drop down. The field that we are using in this example is field number 1.

We also need to determine the name of the questionnaire that contains the field. In this example, we’re using a field on the Web Search questionnaire. Right click the web button. Select edit field setup.

We’ll now finish our command button setup. This is the section where you have to specify some of the variables we set in the pphttplookup.ini Double click in the command box to pull up a bigger view.

Now you will see our completed command line for the web button. The first portion is just calling the program to use with the web button. This will always be the same. The second portion is specifying our field number. In this example, we’re using field one, so “F1” will equal “1”. If we had multiple queries, we could have an “F2”, an “F3” or more, of course the queries would have to be set up in the INI file first. The next section is almost always going to be the same. It specifies the case or party from which we wish to pull data. We have set a variable, which will always pull information from the case, or party that we are currently on. The next section specifies the questionnaire that we want to pull data from. This should have been obtained earlier. We’re using the web search questionnaire. Now we need to specify the alias or database that we want to use. This will almost always be the same as well. The variable we set will always use the alias or database that we are currently logged in to. We’ll use a variable for the next section as well. This will always remain the same. The next section specifies whether or not to try and register dll files. If 1 is specified, the utility will attempt to register some dll’s every time the button is executed. This adds some system overhead. We recommend setting this to 1 for the first button that is set up. The rest should equal 0. Finally, the last section is where you specify which section to read in the INI file. We created a Yahoo Search section, so we’ll type that in here. After all the information is filled out, click the check mark at the top of the screen to save your button. Then click close. If the web button, isn’t where you want it, you can left click on it and drag it anywhere on the questionnaire. Press control alt M, to exit Maintenance Mode.

We can now test our Yahoo Search button, by left clicking on it. Remember, we’ve set up the button to search for the information entered into field 1.

Your default browser should open up a search on for whatever was in field one. Now, we can search any case for the content in field one, by clicking this button.

Web buttons, can be set up to do more advanced searches, such as retrieving property appraisals, send SMS email messages, and much more.