Troubleshooting FAQs


With any program, many things can go wrong (and sometimes all of them at the same time!). While it is impossible to foresee every problem that you may encounter, the following sections detail some of the most common problems or errors you may experience when designing and working with InfoPath forms.

I get an error message “InfoPath cannot create a new blank form”

One of the most common error messages when working with an InfoPath form is the following:

InfoPath cannot create a new blank form. You cannot fill out forms based on this  form template because the file has been moved or copied from its published  location.

One of the causes for this error message is that the form has been “disconnected” from the original form template. For example, if you are using a URL-based form that is not fully trusted, the original form location may have changed or may not be available, or if you have e-mailed a form to a user who does not have access to the original URL referenced in the form.

The best way to distribute fully trusted forms to users is to install the form locally on their machine using the regform.exe utility (or other methods demonstrated in Chapter 14). That way, you can be sure that the form templates are always available, even if it means a bit more administration to keep all the form versions up-to-date on different users’ machines.

When designing a form, a control shows a binding error—how do I fix it?

Binding errors occur when a control is bound to an incorrect field or group of fields or when multiple controls have been bound to the same field. You can recognize binding errors by the icon that appears to the right of the control when you click it or hover your mouse over it:

  • A green icon with an equal sign (=) to the right of a control indicates that the binding for that particular control is correct.

  • A blue icon with an “i” indicates that the binding may be incorrect—right-click the control to view more information about the possible binding issue.

  • A red icon with an exclamation point (!) indicates the binding is definitely bad, and the form may not function correctly until you correct the binding problem.

Most times, the problem will be self-evident—when you move your mouse over the control, the ToolTip text will appear (for example, “Control stores duplicate data”) to give you information on the particular issue that needs to be corrected.

I get an error when I publish my form to a shared location or web server

Before you begin the publishing process, make sure that you have the appropriate rights to publish documents to the shared location or web server where you want to publish your InfoPath form. Check with your network or system administrator to ensure that you have the rights to read and write to the location that you want to publish to and then try the publish process again.

Tip

To test that you have the rights required, set up the network location or web server using My Network Places on your computer and try saving a text file or other type of file to that location first before publishing your form. If this works, then you should be able to publish your form with no problems.

My JScript doesn’t work

There are two main areas where scripts go wrong—syntax and logic. On the syntax side, check the names of all of your variables, functions, declarations, and so on, to ensure that the names are consistent throughout your script and that the case is the same (because MyBalance is not the same as mybalance in JScript). Also check that you have properly terminated each line with a semicolon.

On the logic side of things, print out a copy of your script and walk through the logic to ensure that you are following a logical flow and that the script is producing the desired results. Next, use the tools within the Microsoft Windows Script Editor to walk through your code and observe the results of any calculations, variables in use, and so forth, to try to determine where potential errors exist.

Finally, as a last resort, start commenting out lines of code and get back to basics. Create the structure of your logic piece by piece and use tricks like alerts to ensure that the logical sequence is being followed. This can often help you determine problems where other methods fail (especially with complex nested loops or control structures).

I can’t get the debugger to work when working with scripting

Whenever you installed InfoPath, you may not have installed the required files for debugging. Check out knowledge base article #826991 for more information on the correct installation procedure for installing all the InfoPath components (including debugging).

Where can I change the name of a form I am designing?

When you first save your form, you are presented with a standard Windows Save dialog box that has a Change Name button that allows you to enter the name of the form you have created. You could consider this the “title” of your form, as opposed to the XSN filename. To change the name of an existing form, select File | Save As and click the Change Name button again to specify a new name for the form.

With the outlines of the controls on my form, I can’t see the fields clearly. Is there a way to change the default display?

By default, when you are creating a form, the borders of the control appear as a gray outline, which can be difficult to see. You can change the border around the control by using the Borders and Shading settings, but you need to do this while you are designing the form, because there is no way to change the default settings.

Tip

Another easy option to make the fields more visible is to select View | Sample Data to show sample data in the controls on your form.

Why can’t I change the color of a horizontal line?

Horizontal lines in InfoPath are similar to the horizontal lines you would find when designing web pages. As such, they don’t have a color property associated with them. You may have noticed that the sample forms include a number of different lines, of all sizes and shades. These lines are not actually horizontal lines at all, but rather the borders of tables that have had their color changed using the settings found in Borders and Shading.

As a workaround to add a horizontal line of any color, insert a layout table onto your form with one row and one column and then use the Borders and Shading settings to change the bottom of the row to display a border in the color of your choice.

The results of my expression box are wrong—how do I fix it?

There is a bug in InfoPath where the results of an expression box may be incorrect if decimal numbers are used in the calculation. This bug has been documented in knowledge base article #822024, available at http://support.microsoft.com, and there is no known work-around at this time, other than using scripting to perform the calculation and placing the results back in a control.

Tip

For more information on working with scripting, check out Chapter 10.




How to Do Everything with Microsoft Office InfoPath 2003
How to Do Everything with Microsoft Office InfoPath 2003 (How to Do Everything)
ISBN: 0072231270
EAN: 2147483647
Year: 2006
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net