Create an InfoPath-only view of a browser-compatible form template

Author: mety Labels::



Introduction to InfoPath-only views

You can design one form template that accommodates two types of users — those who have Microsoft Office InfoPath installed, and those who do not. This type of form template is called a browser-compatible form template. In a browser-compatible form template, any InfoPath features, settings, and controls that won't work in a Web browser are hidden or disabled in design mode (design mode: The InfoPath design environment in which you can create or modify a form template.). That way, you aren't tempted to use them in your design.
When you're ready to share a browser-compatible form template with users, you must publish it to a server running InfoPath Forms Services, and then make it browser-enabled (browser-enabled form template: A browser-compatible form template that has been published to a server running InfoPath Forms Services, and that has been browser-enabled so that users can both display and fill out the form in a Web browser.). If users have InfoPath installed on their computer, then the form will open in InfoPath. If they do not have InfoPath installed, then the form will open in a Web browser. Either way, the form template doesn't include InfoPath features, settings, or controls that won't work in a browser.
If you expect that many of your users will have InfoPath installed on their computers, you may not want to limit the design of your form template to the subset of features that are supported in a Web browser. In this case, you can create two views of your browser-compatible form template. One view will be for users who open the form template in a Web browser. The other view will be used exclusively by users who have InfoPath installed on their computers. This InfoPath-only view will never display in a Web browser. Consequently, you can use InfoPath features in this view that you wouldn't otherwise be able to use, such as user roles or master/detail controls.
In this topic, you will learn how to design a dedicated InfoPath-only view in a browser-compatible form template. In addition, you will learn how to create a rule (rule: A condition or action, or a set of conditions or actions, that automatically performs tasks based on events and values in the form.) that detects whether the user opening the form template has InfoPath installed on their computer. If InfoPath is detected, the user will see the InfoPath-specific view. If InfoPath is not detected, the user will see the browser-specific view in a Web browser instead.

Scenarios for use

Imagine that you work for an insurance company, and that you are designing a browser-compatible form template for processing insurance claims. Your browser-compatible form template must accommodate policyholders who open and fill out the claim form from your company's Web site, as well as internal users who review and approve the data in the claim form. Your expectation is that external users do not have InfoPath installed on their computers and that internal users do have InfoPath. To accommodate users who do and do not have InfoPath installed, you could design two distinct form templates — one that is browser-compatible and one that is not. However, it is easier and more time-efficient to design one browser-compatible form template that includes the following views:
View 1: External, claim-filing view This is the view that policyholders see when they log in to your Web site and open a claim form. Because there is no way for you to know whether a policyholder has a copy of InfoPath installed on his or her computer, the form template must be browser-compatible. That is, you must ensure that the form can be filled out by using a Web browser.
View 2: Internal, claim-processing view This view is for claims processors, who review the submitted claim form and route it to an insurance adjuster for approval. All insurance company employees have InfoPath installed on their computers. Therefore, you can design a dedicated InfoPath-only view for them. Unlike the claim-filing view, which is accessed by policyholders using a Web browser, the InfoPath-specific view never displays anywhere but in InfoPath, and may therefore contain any of the features, controls, and settings that are not available in browser-compatible form template.

Step 1: Add an InfoPath-only view to a browser-compatible form template

To create an InfoPath-only view in a browser-compatible form template, you change a setting in the View Properties dialog box. This setting allows InfoPath users to see the view, but prevents the view from displaying in a Web browser.
  1. Open your browser-compatible form template.
  2. On the View menu, click Manage Views.
  3. Under Actions, in the Views task pane, click Add a New View.
  4. In the Add View dialog box, type a name for the view, and then click OK.
  5. In the Select a view list, double-click the view that you just created.
  6. Click the General tab.
  7. Clear the Show on the View menu when filling out the form check box. Note Clearing this check box prevents users who do not have InfoPath installed from attempting to switch to the InfoPath-only view.
  8. Select the Allow InfoPath-only features (the view will not be available in Web browsers) check box, and then click OK.
  9. Design your view as you normally would. You are now able to use many of the features, controls, and settings in your InfoPath-only view that would not otherwise be available in a browser-compatible form template. For example, you are free to use any of the controls in the Controls task pane, as opposed to just the ones that work in a browser. In addition, you will not see any browser-compatibility errors or messages in the Design Checker task pane.
    Note Although you can use the majority of InfoPath features in your InfoPath-only view, certain features and settings that apply to the browser-compatible form template as a whole remain disabled or hidden. For example, you cannot enable digital signatures for the entire form template or use script in your view, since one of the views of your form template is browser-compatible.

  10. To add additional InfoPath-only views to your browser-compatible form template, repeat steps 2-9.

Step 2: Display the browser-only view when the browser-enabled form template is opened in a Web browser

In this procedure, you'll learn how to create a rule that dictates the view that the user sees when they first open a form based on your browser-compatible form template. The rule runs when the form is first opened, and after a particular condition is met. The condition in this case has to do with whether users are opening the browser-enabled form template in a Web browser. If they are, then the browser-only view of the form template appears. This view is limited to the set of features that are supported in a browser.
  1. Open your browser-compatible form template containing the InfoPath-only view.
  2. On the Tools menu, click Form Options.
  3. In the Category list, click Open and Save.
  4. Under Open behavior, click Rules.
  5. In the Rules for Opening Forms dialog box, click Add.
  6. In the Rule dialog box, type a meaningful name for your rule, such as Rule 1: Switch to Browser View.
  7. To specify when the rule should run, click Set Condition.
  8. In the first box under Apply the rule when this condition is true, click The expression.
  9. In the second box, type xdEnvironment:IsBrowser(), and then click OK.
  10. In the Rule dialog box, click Add Action.
  11. In the Action list, click Switch views.
  12. In the View list, click the browser view that you want to switch to, and then click OK.
  13. To prevent any rules from running after this rule (for the current event), select the Stop processing rules when this rule finishes check box in the Rule dialog box. The rule that you just created will run when the form template is opened and the condition you specified — that is, that the user's environment is a Web browser — is met.

Step 3: Display the InfoPath-only view when the browser-enabled form template is opened in InfoPath

Now you will add another rule to your browser-compatible form template. This rule runs when the form is first opened, and after a particular condition is met. The condition in this case has to do with whether the user who is opening the browser-enabled form template has InfoPath installed on his or her computer. If Infopath is installed, then the InfoPath-only view of the form template displays. Because this view is only visible from within InfoPath, it can contain the full range of InfoPath features.
  1. Open your browser-compatible form template containing the InfoPath-only view.
  2. On the Tools menu, click Form Options.
  3. In the Category list, click Open and Save.
  4. Under Open behavior, click Rules.
  5. Click Add.
  6. In the Rule dialog box, type a meaningful name for your rule, such as Rule 1: Switch to InfoPath View
  7. To specify when the rule should run, click Set Condition.
  8. In the first box under Apply the rule when this condition is true, click The expression.
  9. In the second box, type not(xdEnvironment:IsBrowser()).
  10. Click And.
  11. In the first box under the first condition, click The expression.
  12. In the second box, type not(xdEnvironment:IsMobile()), and then click OK.
  13. In the Rule dialog box, click Add Action.
  14. In the Action list, in the Action dialog box, click Switch views.
  15. In the View list, click the InfoPath-only view that you want to switch to, and then click OK.
  16. To prevent any rules from running after this rule (for the current event), select the Stop processing rules when this rule finishes check box in the Rule dialog box. The rule that you just created will run when the form template is opened and the condition you specified — that is, that the user's environment is InfoPath and not a Web browser or a mobile device — is met.


0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2