Microsoft InfoPath 2010
The official blog of the Microsoft InfoPath team

  • Microsoft InfoPath 2010

    Converting a Data Source

    • 3 Comments

    For anyone who has developed an InfoPath form template against a schema, database, or Web service that has changed since the form template was initially created, the following should be some good news.  The SP1 Preview Release of InfoPath contains the ability to provide InfoPath with an updated version of your schema or data source and InfoPath will update your solution accordingly.  That’s right, gone are the days of hand modifying the XSF, template file, XSL, etc. in order to change the schema.  You can change your main data source via the ToolsàConvert Main Data Source menu entry or a data connection via the modify button for that source in the ToolsàData Connection dialog.

    When you provide InfoPath the updated data source, InfoPath will update the schema files stored in the form template and look for and apply changes between the old and new data source.  In particular InfoPath will look for type changes, cardinality changes, namespace changes, adds, deletes, renames, and move operations.  For any recognized operation, all existing bindings in the view, XSF, and event handler hookup will be fixed accordingly (note, it is still your responsibility to fix business logic code.)  Unfortunately InfoPath is not omnipotent, so it might not be the best idea to wait until you have renamed, moved, and extremely modified the children of an element before providing the updated schema to InfoPath ;-)

    (And if a menu option to update your data source isn't convenient enough, tomorrow we'll start a five part series on the InfoPath Team Blog showing you how you can automate this sort of operation by taking advantage of InfoPath's XML-based form template file format.) 

  • Microsoft InfoPath 2010

    Use patterns (e.g., digits or quotes) to validate data in InfoPath

    • 3 Comments

    Example 1: How do I restrict the user from entering special characters into certain fields in the InfoPath Form?

    Note: This example assumes you are running InfoPath 2003 with the SP-1 feature enhancements enabled. [Added 6/21/04]

    The easiest way to do this is to use pattern for data validation. For example, you might want a user to enter data in the ###-##-#### format for the Social Security Number field. If the user’s input does not match this format, you may want to throw an alert. You can achieve the above by doing the following:

    1. In Design mode, insert a Textbox Control
    2. Double click on the Textbox Control to get the properties dialog box
    3. Click on Data Validation | Add
    4. Choose “does not match pattern” from the second dropdown and “select a pattern” from the third dropdown
    5. Click on “Social Security number” from the standard patterns dialog

      Picture of the Data Entry Pattern dialog
    6. Click OK to accept the changes
    7. In the Data Validation dialog, choose “Dialog box alert” from the Error alert type dropdown and specify some alert message

      Picture of the Validation dialog
    8. Click OK to accept the changes
    9. You can test your form by clicking on the Preview Form button, in the toolbar  

    Example 2: I cannot put a double quote (“) or an apostrophe (‘) in the pattern builder. How do I validate data against a pattern that contains a double quote (“)?

    You can validate data against a pattern that contains double quotes by using Jscript regular expression. For example, you might want a user to enter data in the “###” format (a pattern contains double quotes) for a field. If user’s input does not match this format, you may want to throw an alert. You can achieve the above by doing the following:

    1. In Design mode, insert a Textbox Control
    2. Double click on the Textbox Control to get the properties dialog box
    3. Click on Data Validation
    4. In the Script section, choose “OnAfterChange” from the dropdown and Edit

    Picture of the Data Validation dialog

    1. Add the followings to your code  

    function msoxd_my_field1::OnAfterChange(eventObj)

    {

    // Write code here to restore the global state.

                    if (eventObj.IsUndoRedo)

                        {

    // An undo or redo operation has occurred and the DOM is  read-only.

                                    return;

                         }

     

    // A field change has occurred and the DOM is writable. Write code here to respond to the changes

     

                    // Specify your pattern using Jscript regular expression

                    var re1 = new RegExp(“\x22\\d\\d\\d\x22”);

     

                    // Get the field value

    var s = XDocument.DOM.selectSingleNode(“my:myFields/my:field1”).text;

     

    // Find a match within string s

    if (re1.exec(s) = = null && eventObj.Operation = =  “Insert”)

                    XDocument.UI.Alert(“User input does not match the required pattern”);

                    }

     

    1. After editing all the code, click OK to accept the changes
    2. You can test your form by clicking on the Preview Form button, in the toolbar
  • Microsoft InfoPath 2010

    Recursive Controls support in InfoPath 2003 SP1

    • 3 Comments

    The SP1 release of InfoPath 2003 supports recursive controls such as Repeating Recursive Section and Optional Recursive Section. Based on the schema of the solution, these controls are automatically suggested when dragging nodes from the Data Source task pane. This article talks about different types of recursion that are supported within InfoPath.

    Direct Recursion:

    This is the case when the node is recurring directly under itself. For example, if you are creating an organization chart, you might have a schema that has the following structure:

    Employee*

    EmployeeData

    ID
    Name
    …..

    Employee*

    Every employee has EmployeeData associated with him and can have 0 or more employees working for him. Note that the * stands for repeating 0 or more times. If you select the top level Employee node in the Data Source task pane, InfoPath would suggest a Repeating Recursive Section in this case with the recursive instance showing up directly under its parent.

    Picture of design mode for the direct recursion structure

    Indirect Recursion:

    This is the case when the node is recurring as a child of another node within itself. For the above organization chart, you may choose to abstract the fact that Employee is a manager or not by introducing an Optional node Manager. In this case the structure is as follows:

    Employee*

    EmployeeData

    ID
    Name
    …..

    Manager?

    ManagerData

    ID
    Name
    NumOfReports
    …..

    Employee*

    In this case, when you drag top level Employee node, InfoPath will create a Repeating Recursive Section that has the recursive instance within an Optional Section that corresponds to Manager node.

    Picture of design mode of the indirect recursion structure

    Potential Recursion:

    This is the case when the node is recurring under as one of the choices under itself. Again taking the above organization chart example, we may choose to not include EmployeeData for managers since it is covered under ManagerData. So now we could have the following structure:

    Employee*

    Choice

    Non-Manager

    EmployeeData
    ID
    Name
    …..

    Manager

    ManagerData
    ID
    Name
    NumOfReports
    …..

    Employee*

    Now we have an employee who can either be a manager or not. In this case, when you drag top level Employee node, InfoPath will create a Repeating Recursive Section that has the recursive instance within a Choice Section.

    Picture of design mode of the potential recursion structure

    In summary, you have seen how InfoPath supports various types of recursion in its SP1 release. These three examples were just to illustrate the broad categories of recursion but you can go beyond these and try various other combinations based on your needs.

  • Microsoft InfoPath 2010

    What button was clicked?

    • 3 Comments

    Another question that we get asked a lot:

    I include a Repeating Section control in my form, containing a Button and a Text Box. At runtime, a user inserts 5 items. How do I know which Button was clicked so I can get to the Text Box’s value?

    That’s actually the wrong question to ask. Strictly speaking, InfoPath doesn’t know the difference between the Buttons. They are all identical clones. What’s different about each button is its context within the view, and the view is mapped to the data. (In InfoPath it always comes back to the data.)

    If your schema looks like this:

    • myNodes
      • group1
        • group2 (repeating)
          • field1

    Your view probably looks something this:

    [View Structure]

    Since the Button control is inside the Repeating Section which is bound to group2, we say that the Button’s context is group2.

    So what?

    When the Button event is received, it contains a DocActionEvent object. The event object has a Source property. And this property is the Button’s context node – the specific group2 instance the Button is inside.

    So at this point, you can just use eventObj.Source to refer to data relative to the Button. Probably the easiest thing to do is just do some old school debugging using alerts. Here’s how to make sure you’re getting the context right:

    function CTRL3_5::OnClick(eventObj)

    {

    // Write your code here

    XDocument.UI.Alert( eventObj.Source.xml );

    }

    Here’s what you’d get:

        <my:group2 xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-09-14T16:02:14">

            <my:field1>abc</my:field1>

        </my:group2>

    And to wrap things up, to get the text inside the Text Box, you need to use eventObj.Source.selectSingleNode():

    function CTRL3_5::OnClick(eventObj)

    {

    // Write your code here

    XDocument.UI.Alert( eventObj.Source.selectSingleNode("my:field1").text );

    }

  • Microsoft InfoPath 2010

    InfoPath Quick Tip: Setting a User Role as the Initiator

    • 3 Comments

    In Microsoft Office InfoPath 2003, you can assign users to distinct categories, called user roles, which are based on job title or other criterion. InfoPath can perform custom actions that vary based on the current user role, such as switching views, conditional formatting, data validation, or filter settings.

    Some InfoPath form designers have found the Set as initiator option for user roles to be somewhat confusing when specifying a role using network accounts. (The Set as initiator option is available when defining a user role by clicking User Roles on the Tools menu, and then clicking Add). Setting a user role as the initiator will cause InfoPath to use that role whenever a new blank form is opened for the first time regardless of how the user is logged on to the network. However, the next time that user opens the same form, InfoPath will use the person's assigned user role instead of the initiator role

    For example, suppose you create a form template with an Employee View and a Manager View and then create a rule to switch views based on whether the current user role is Employee or Manager as demonstrated in Lab 7: User Roles in InfoPath 2003. Because the Employee role is set as the initiator, when a user creates new blank form, InfoPath will always set the user role to Employee even if the current user is not a member of the network group or user accounts specified for the Employee user role. As a result, InfoPath will always switch to the Employee View the first time a user creates a new blank form. Only after the form is saved and re-opened will the rule be applied based on the user role defined for the user's network account.

  • Microsoft InfoPath 2010

    More than one way to write code: Visual Studio and InfoPath

    • 3 Comments
    If you need to write some Visual Basic or C# code behind your form, or maybe just some script, there are a few different tools you can use depending on which versions of InfoPath and Visual Studio you have.
     
    Here's a quick table summarizing it all:
     
     
    Note that both Microsoft Script Editor (MSE) and Visual Studio Tools for Applications (VSTA) come with InfoPath 2007 Beta, so you can open them from the Tools | Programming menu. If you don't see the one you want, change the language in Tools | Form Options. If it gives you an error that it's not installed, here's how to install them:
     
    1. If you are going to install VSTA, make sure you have the pre-requisites first:
    2. Go to Start > Control Panel > Add or Remove Programs
    3. Select your Office installation and click Change
    4. In the Office Setup wizard select to add features
    5. Find Microsoft Script Editor (under Office Tools) and/or Visual Studio Tools for Applications (under InfoPath > .NET Programmability) and select Run from my computer
    6. Finish the wizard
     
    Happy code writing!
    - Ned
  • Microsoft InfoPath 2010

    Enforcing unique values in a repeating list

    • 3 Comments
    Have you ever created a form which allows the user to choose items from a list and you wanted to make sure the user doesn't choose the same item twice?  If you've got InfoPath 2007 you can use the new Multi Select List Box, but if you've got InfoPath 2003, you're still in luck, this blog entry is for you!
     
    Note: You should be familiar with XPath expressions before preceding.
     
    Let's start with a repeating table with a dropdown control bound to a secondary data source.
     
     
    There are a few choices when it comes to enforcing unique values selected by the user:
    1. Only show values that have not already been selected by the user.
    2. Show a validation error when the user selects something which has already been selected.
    3. Write code using the Changing event.
     
    This blog entry will cover both options 1 and 2.
     
    Option 1 - Only show values that have not already been selected by the user
     
    Only showing certain values implies that a filter is being applied to the dropdown.  To apply a filter, click the Filter Data… button when selecting the entries for the dropdown to show the condition builder.  Unfortunately, there is no UI in the condition builder to build an expression that means "don't show anything that is already in the list".  Thus, we'll have to construct this manually by selecting The Expression.
     
     
    You might be tempted to put the following expression:
    . != xdXDocument:get-DOM()/my:myFields/my:items/my:item/my:product
    This will return true if any one value from the list matches the current value.  In other words, this condition will always return true if there are two entries in the list which are different.  (Definitely not what we are looking for)
     
    The correct condition is a slight adjustment to the former expression:
    not(. = xdXDocument:get-DOM()/my:myFields/my:items/my:item/my:product)
    This will only return true if none of the values from the list matches the current value.  In other words, only values that are not in the list will be displayed.
     
    Preview the form and you will see that the dropdown only lists the products that have not already been selected.
     
     
     
    Option 2 - Show a validation error when the user selects something which has already been selected
     
    The only way this will work properly is if we add a hidden calculated field along with the product selection.
    (The reason for this is a bit too complex to explain here, so it'll have to wait for another time.)
     
     
    The formula for the unique field is the following:
    not(../my:product = (../preceding-sibling::my:item | ../following-sibling::my:item)/my:product)
    This will set Unique to true if and only if the product isn't already selected preceding or following the current item.
     
    The next and final step is to use data validation on the dropdown to show an error.
     
     
    Preview the form and you will see that the dropdown will show a validation error if the items are not unique.
     
     
    - Gary
    Software Development Engineer
  • Microsoft InfoPath 2010

    Browser Forms with Spell Check

    • 3 Comments
    With InfoPath Forms Services, you can take powerful InfoPath forms, and allow users to fill them out by using a browser. This enables your forms to reach more customers than ever before. Many Office users have been enjoying the convenience of spell check in Word and InfoPath. To enable this valuable feature for browser forms, we recommend pointing your customers to an Internet Explorer extension called ieSpell. It will check the spelling in your document, just like you would expect it to; you even get to store your personal word list or (clever!) point ieSpell to a Microsoft Office dictionary.
     
    After filling out a form, hit the ieSpell button and it pops up a dialog, similar to the Microsoft Office spell check. If you want to know the meaning of the word, the thesaurus is just a click away.
     
     
    Installing the program is quick and easy. Download from here (free for non-commercial use). When you're done, you will see a new button in the IE toolbar, as well as a new Tools menu item.
     
     
    If you are interested to learn more about ieSpell and other browser extensions, take a look at this article from the Internet Explorer team blog.
    Pradeep Rasam
    Program Manager
  • Microsoft InfoPath 2010

    Yesterday's InfoPath WebCast: Programming Workflow into InfoPath Solutions: Using InfoPath with BizTalk Server 2004 and Human Workflow Services

    • 3 Comments

    Hello everyone,

    I want to personally thank those of you who attended yesterday’s WebCast: Programming Workflow into InfoPath Solutions: Using InfoPath with BizTalk Server 2004 and Human Workflow Services which was presented by Rick Severson.  I hope you enjoyed the talk as much as I did and were able to learn something new.  Also, I hope you filled out a survey at the end of the talk so you are entered in the Halo 2 contest.  (Please visit the following URL to view the contest rules: http://msdn.microsoft.com/office/understanding/infopath/multimedia/halo/default.aspx.)

    If you were unable to attend the talk, don’t worry.  It was recorded and is available via the following URL: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032259548&Culture=en-US.   (You will have to register before you can view the recorded WebCast.)

    Please join us next Tuesday, December 14 from 11am – 12:30pm PST for the next presentation in the InfoPath WebCast series: “Database Connectivity in InfoPath Through ADO.NET DataSet Support” which will be presented by Mikhail Vassiliev, a Software Design Engineer on the InfoPath team.  You can register for this talk by clicking on the following URL: http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259550&Culture=en-US.  I hope you will join us.

    Here is more information about the talk:

    MSDN Webcast: Database Connectivity in InfoPath Through ADO.NET DataSet Support—Level 400    

    Start Time:       Tuesday, December 14, 2004 11:00 AM (GMT-08:00) Pacific Time (US & Canada

    End Time:        Tuesday, December 14, 2004 12:30 PM (GMT-08:00) Pacific Time (US & Canada

    Event Description 

    In this webcast session you will learn how to use Microsoft® Office InfoPath™ to design a form as a front-end to a Web Service that exposes ADO.Net DataSet structure. We will teach you the InfoPath Data Adapter architecture, new Data Adapters in InfoPath 2003 SP-1, and talk about reasons for using ADO.NET DataSets in a Web Service with InfoPath forms. See the advantages and the restrictions when using DataSets in InfoPath. You will also get an inside view of the InfoPath DataSet support implementation so you can see how this feature works in InfoPath.

    Presenter: Mikhail Vassiliev, Software Design Engineer,Microsoft Corp.

    Mikhail Vassiliev has been a member of the Microsoft® Office InfoPath™ Team from the beginning of the application development, joining Microsoft at 1998. He has been designing and implementing a wide range of the program components starting from the basic editing, data adapters, and finishing with SDK tools. Mikhail enjoys programming and continues to work on the new InfoPath features.

    Scott Roberts

  • Microsoft InfoPath 2010

    Microsoft Office InfoPath 2003 Toolkit for Visual Studio 2005

    • 3 Comments

    Visual Studio 2005, SQL Server 2005, and BizTalk 2006 all launched on Monday.

    That means the Microsoft Office InfoPath 2003 Toolkit for Visual Studio 2005 is now available as part of the Visual Studio 2005 Tools for the Microsoft Office System.

    To install the Toolkit, run setup from the CD labeled "Microsoft Office InfoPath 2003 Toolkit for Visual Studio 2005" that is included with the Visual Studio 2005 Tools for Office package, or from the separate related download for MSDN Subscribers.

    Find out more here: http://msdn.microsoft.com/office/understanding/vsto/

     

  • Microsoft InfoPath 2010

    Transforming InfoPath Rich Text to Word

    • 3 Comments

    This article applies to InfoPath 2003 and Word 2003.

    Summary

    InfoPath is great for capturing structured data. A common scenario is that you need to output that data in a Word document. It is quite easy to create an XSLT transformation that will take the XML generated by InfoPath as input and generate WordprocessingML tags. For example, to output the value of the EmployeeName form field in a word document’s paragraph you would use the following XSLT fragment:


    <w:p><w:r><w:t>
         <xsl:value-of select=”my:EmployeeName”/>
    </w:t></w:r></w:p>

    Most mappings will be quite similar, in that they end up in a <w:t> tag, which Word uses to contain, well euh… text. There is one exception to this, namely when you use rich text fields in your form. A rich text field can contain formatted text, images, hyperlinks, tables, etcetera and although the XHTML format that is used to represent the contents is similar to WordprocessingML, there are important differences. This article provides a reusable solution for dealing with those differences.

    Downloads: XSLT transformation source code and sample input files are all bundled in the attached archive.

    Details

    To illustrate the capabilities of a rich text field I created the form below, which contains a single rich text field. I created an instance of it with some sample formatted content:

    The contents of the field itself is structured using the XHTML standard, that looks like this:

    ...
    <div xmlns="http://www.w3.org/1999/xhtml">This is an example of a rich text control that contains various formatted elements such as <strong>bold </strong>and <em>italic </em>text, aligned text with <font color="#0000ff">foreground </font>and <font style="BACKGROUND-COLOR: #3366ff">background </font>colors, <font style="BACKGROUND-COLOR: #ffff00"><strong>bulleted</strong></font> and <font style="BACKGROUND-COLOR: #0000ff" color="#ffff00">numbered </font>lists, a table and an image.</div>
    ...

    Should you try to insert this as such in a <w:t> tag, you would end up with an invalid Word document. You have to take each individual XHTML tag and transform it to its WordprocessingML counterpart. For some tags (strong, font, …) this is quite straightforward, but for others this can be quite a challenge.

    What you will find in the download accompanying this article, is an XSLT template that you can include as is in your own XSLT stylesheets and that will result in a visually equivalent word document. The result of transforming the above form to word using this template looks like this:

    Beware that this is a work in progress. The template is suitable for most basic formatting (things you hand-type in the form), but will most probably fail when you cut/paste content from the web with heavily nested table formatting. If you have that requirement, you’ll have to resort to coding techniques rather than transformation.

    The input files

    The download contains a number of xml documents generated with Infopath. To test these with the transformation, right-click the file and choose Open With… Word. In the XML task pane, browse to the “BASIC IP_To_Word.xslt” to transform.

    The transformation file

    The first part of the “BASIC IP_To_Word.xslt” file is simply a blank word document saved as xml and then turned into a stylesheet. This can be done in a few easy steps:

    1. Wrap the entire document in <xsl:stylesheet version=”1.0”> tags
    2. Remove the <?mso-application …> processing instruction
    3. Move all the namespace definitions in the wordDocument tag to the stylesheet tag
    4. Add the xsl namespace as xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”
    5. Add the namespace of the source xml file, for example: xmlns:ns0=”http://YourCompany/YourXMLRootNode”
    6. Move the closing </w:body> and <w:wordDocument> from the end to right after the <w:body> opening tag
    7. Wrap the <w:wordDocument> node in an <xsl:template match=”/”> node
    8. Right before the <w:wordDocument> node, add
      <xsl:processing-instruction name="mso-application">
      <xsl:text>progid="Word.Document"</xsl:text>
      </xsl:processing-instruction>
    9. In the <w:body> node, add <xsl:apply-templates select=”/ns0:YourXMLRootNode”/>
    10. Wrap the remainder of the body in a node <xsl:template match=”ns0:YourXMLRootNode”/>
    11. Add <xsl:value-of select=”ns0:YourNode”/> instructions where needed
    12. If you have repeating nodes, you can add these with an <xsl:for-each select=”...”> construct

    The interesting stuff is where the rich text field IPRT is passed to a template named “infopath rich text”. Everything below it can be copied to your own stylesheet. Then you can use the following construct to render any rich text field anywhere in the word document:

    <xsl:template match=”my:YourFieldHere”>
          <xsl:call-template name=”infopath-rich-text”/>
    </xsl:template>

    You can also add the following parameters to the call template instruction:

    pPr_Default: A list of paragraph formatting properties that need to be set on each paragraph transformed from the rich text

    rPr_Default: A list of character formatting properties that need to be applied on all the text (for example the default font)

    Stephane Bouillon
    Senior Consultant
    Microsoft Consulting Services

    Thanks goes to David Gerhardt for his articles.

  • Microsoft InfoPath 2010

    Do You Love Access? We do too!

    • 3 Comments

    And that's why there's all the new-and-cool documentation about how to make your InfoPath forms work well with Access:

    And a few bonus articles, also from our friends in the documentation team:

    Happy Friday!
    Alex

  • Microsoft InfoPath 2010

    Debugging Browser Forms

    • 3 Comments

    Debugging InfoPath forms in the client environment is relatively simple: set a breakpoint, press F5 and execute the process that will cause the breakpoint to be hit. However, debugging InfoPath forms that are opened in the browser requires some additional steps:

    1) Ensure the InfoPath Form Template is compiled in the Debug Configuration so the XSN includes the symbol (PDB) file
    2) Open the local copy of the code file in Visual Studio and set a breakpoint
    3) Attach to the appropriate w3wp process
    4) Execute the process that will cause the breakpoint to be hit

    So let’s take a look at each step individually.


    Step 1: Ensure the InfoPath Form Template is compiled in the Debug Configuration so the XSN includes the symbol (PDB) file

    1) Open the InfoPath Form Template in Design View
    2) Open the Code Editor
    3) From the Project menu choose “<ProjectName> Properties”
    4) Insure the Configuration option is set to Active (Debug)

    NOTE: If you do not see the Configuration option make sure the “Show Advanced Build Configurations” option is enabled: Tools | Options | Projects and Solutions | General

    5) Build and save the project
    6) Publish the Form Template to your Microsoft Office SharePoint Server

    NOTE: If you want to make sure the XSN you are publishing includes the symbol (pdb) file, save the XSN as Source Files and review the resulting files to make sure there is the .pdb file.


    Step 2: Open the local copy of the code file in Visual Studio

    1) Launch Visual Studio 2005
    2) Open the code file (i.e. FormCode.cs) from the project files folder for your Form Template
    3) Set a breakpoint


    Step 3: Attach to the appropriate w3wp process

    1) Open Internet Explorer and navigate to your site
    2) From the Debug menu in Visual Studio choose “Attach to Process…”
    3) For the “Attach To” option make sure this has at least “Managed code” – if not, click the Select button to enable Managed Code
    4) Select the correct w3wp process and click Attach

    NOTE: Determining the correct w3wp process can be a bit tricky. To isolate the correct process:
    - From the server machine, open a command prompt
    - Navigate to the System32 directory and run the following script: iisapp.vbs. This script will list all the currently running w3wp.exe processes, listing their PID and associated application pool id. The application pool id is the only relation between the pid and your application.
    - Use the PID to identify the correct w3wp.exe on the “Attach to Process” screen.


    Step 4: Execute the process that will cause the breakpoint to be hit

    1) Open your form in the browser and execute the process that will cause the code to run – execution should stop when it hits your breakpoint!

    Scott Heim
    Support Engineer

  • Microsoft InfoPath 2010

    Hosting InfoPath forms in a custom ASPX page

    • 3 Comments

    Many of you saw a detailed MSDN article on embedding an InfoPath XmlFormView control into a custom ASP.NET page. But - there's more to it. I came across an interesting blog post that talks about embedding a browser-based InfoPath form into a webpart. Here's another post of someone who got it to work, with nice screenshots.

    Alex Weinstein
    Program Manager

  • Microsoft InfoPath 2010

    InfoPath 2007 Training Labs

    • 3 Comments

    I’m pleased to announce that InfoPath 2007 training labs are now live on MSDN. Just like with the hands-on labs for InfoPath 2003, we created a set of exercises that walk you through a real-life scenario, introducing a new InfoPath feature in the process. Here are the new labs:

    Lab 1: Publishing an InfoPath 2007 Form Template to a Server Running InfoPath Forms Services
    Lab 2: Deploying and Managing InfoPath 2007 Forms
    Lab 3: Integrating InfoPath 2007 with the Data Connection Library
    Lab 4: Enabling Digital Signatures in InfoPath 2007 Form Templates
    Lab 5: Importing Word Forms into InfoPath 2007
    Lab 6: Using InfoPath 2007 E-mail Forms
    Lab 7: Restricting Permissions to InfoPath 2007 Forms and Form Templates
    Lab 8: Using the InfoPath 2007 Object Model and Visual Studio Tools for Applications
    Lab 9: Designing InfoPath 2007 Forms for Mobile Web Browsers
    Lab 10: Creating and Inserting InfoPath 2007 Template Parts
    Lab 11: Integrating InfoPath 2007 Forms in Web Sites Using Visual Studio
    Lab 12: Using SharePoint Server Workflows with InfoPath 2007

    Many InfoPath 2003 labs are still relevant - so if you need a refresher on fundamentals, here's the list:

    Lab 1: Editing forms and working with form data (Level 100)
    Lab 2: Creating forms and layout (Level 200)
    Lab 3: Form deployment (Level 200)
    Lab 4: Working with controls (Levels 200 and 300)
    Lab 5: Business logic (Levels 200 and 400)
    Lab 6: Active X controls (Level 400)
    Lab 7: User roles (Level 200)
    Lab 8: Working with data sources (Levels 300 and 400)
    Lab 9: Working with ADO.NET DataSets (Level 400)
    Lab 10: Digital signatures (Levels 300 and 400)
    Lab 11: Advanced form merging (Level 400)
    Lab 12: Workflow support (Level 400)
    Lab 13: Working with schemas (Level 300)
    Lab 14: Working with custom task panes (Level 400)
    Lab 15: Business logic using managed code (Level 400)
    Lab 16: External automation (Level 400)

    Alex Weinstein
    Program Manager

  • Microsoft InfoPath 2010

    Estimate performance and capacity requirements for InfoPath Forms Services environments

    • 3 Comments

    A new document went live today on Technet around capacity planning for IPFS.  Have a look and let us know what you think:

     

    http://technet.microsoft.com/en-us/library/cc879113.aspx

     

     

  • Microsoft InfoPath 2010

    Manage data in your SharePoint Lists using the InfoPath Form Web Part

    • 3 Comments

    One of the powerful new features in InfoPath 2010 is the InfoPath Form Web Part.

    This is the 1st in a series of videos where we will show how to use the InfoPath Form Web Part to create rich mashups on portal pages in SharePoint, without writing a single line of code. In this video, Nick Dallett, a program manager lead on the InfoPath team, will demo two simple scenarios for managing data in your SharePoint lists using the InfoPath Form Web Part.

     

    Get Microsoft Silverlight

    Enjoy!

  • Microsoft InfoPath 2010

    Create a Rating Control using Picture Buttons

    • 3 Comments

    In this short video demo, Matt Bielich from the InfoPath test team shows how you can add a rating control to your InfoPath 2010 forms using picture buttons.

    Get Microsoft Silverlight
  • Microsoft InfoPath 2010

    Free InfoPath 2010 Web Cast: Best Practices in Form Design

    • 3 Comments

    The fourth and final session in the InfoPath 2010 Academy Live series, Best Practices in Form Design, by InfoPath PM lead Daniel Witriol takes place this Wednesday, May 5th at 8:30 AM (PST).

    You can sign up for this free Web cast on https://www.eventbuilder.com/event_desc.asp?p_event=a2d1f10w.

    If you’ve missed any of our earlier sessions, you can watch them on demand at the links below:

    Academy Live

  • Microsoft InfoPath 2010

    Create Code-Free Mashups with InfoPath and SharePoint Web Parts

    • 3 Comments

    Hi, My name is Nicholas Lovell and I’m a developer on the InfoPath team. In this video demo, I will walk through how to create a simple portal page for processing claims at an insurance company. This claims portal includes a SharePoint Web Part with a list of all the claims, an InfoPath Web Part that displays the claim details, and a custom Bing Maps Web part which displays the location of the currently selected claim.

    Get Microsoft Silverlight

    Enjoy and please share your comments with us!

    Nick

  • Microsoft InfoPath 2010

    Enabling InfoPath IntelliSense Documentation in VSTA and Visual Studio

    • 2 Comments

    The Microsoft Office InfoPath 2007 setup program installs two .xml files that are designed to display programming information from the Class Library reference inline in the Code Editor and the Object Browser when working with members of the Microsoft.Office.InfoPath and Microsoft.Office.Interop.InfoPath.SemiTrust namespaces.

    Displaying Programming Information in the Code Editor

     

    Displaying Programming Information in the Object Browser

    For this programming information to be visible in the Visual Studio Tools for Applications (VSTA) and Visual Studio development environments, you must copy the two .xml files from the InfoPath setup directory into the locations in the Global Assembly Cache (GAC) where each of the InfoPath assemblies are installed. To do that, you use the Command Prompt to copy the files as described in the following steps.

    To copy the IntelliSense documentation files for the Microsoft.Office.InfoPath and Microsoft.Office.Interop.InfoPath.SemiTrust assemblies into the GAC:

    1. Open the Command Prompt.
    2. Execute each of the following commands, pressing Enter after each command:

    cd \Program Files\Microsoft Office\Office12

    copy Microsoft.Office.InfoPath.xml %windir%\Assembly\GAC_MSIL\Microsoft.Office.InfoPath\12.0.0.0__71e9bce111e9429c

    copy Microsoft.Office.Interop.InfoPath.SemiTrust.xml %windir%\Assembly\GAC\Microsoft.Office.Interop.InfoPath.SemiTrust\11.0.0.0__71e9bce111e9429c

    Note   If you are running Windows Vista and using User Account Control, you must right-click the shortcut used to open the Command Prompt, and then click Run as administrator to successfully copy the .xml files into the GAC.

    Mark Roberts
    Programming Writer

  • Microsoft InfoPath 2010

    Cool Forms! Team Signoff Form

    • 2 Comments

    This week’s cool InfoPath form is a simple form that we’re using for each team in Office to sign off that Office 2010 is ready to ship. One of the neat things about this form is that it makes the signoff process a visual experience by using conditional formatting to show and hide pictures based on the status.

    Signoff 1

    The form also contains rules to enforce that final signoff can only happen once both bug and testing signoffs have been completed.Signoff 2

    If you have a “cool” form that you would like to share with us, please send an e-mail with the following details to coolform@microsoft.com -

    • Attach 1 or 2 screenshots of your form
    • Provide a brief description of the form
    • You may also attach the XSN file (optional)

    The most popular submissions will be featured on our blog in future posts.

    Check out other Cool Forms! here.

    Thanks!

    The InfoPath Team

  • Microsoft InfoPath 2010

    New book on SharePoint content types

    • 2 Comments

    Have you ever wanted to do more with content types in SharePoint, but weren't quite sure how?  There's a new book by David Gerhardt and Kevin Martin which goes deep on the subject, including a chapter on creating Document Information Panels using InfoPath.

    Check it out!

    http://www.amazon.com/Building-Content-Type-Solutions-SharePoint/dp/1584506695/ref=sr_1_1?ie=UTF8&s=books&qid=1221580433&sr=8-1

  • Microsoft InfoPath 2010

    New InfoPath articles on Office Online

    • 2 Comments

    The following new article and video demos are now available on the InfoPath Home Page on Microsoft Office Online:

     

    Get started: Create a meeting note system with InfoPath and SharePoint-shows you how to use a sample form template included with InfoPath and a SharePoint document library to create a meeting note system.

     

    Demo: Store InfoPath forms in a document library on a SharePoint site-watch how you can publish a sample form template to a new document library.

     

    Demo: Populate a drop-down list box from a SharePoint list—watch how you can put that SharePoint list into a list box control on an InfoPath form template.

     

    At the end of each article, you can let me know if you like or hate these articles by answering the question, Was this information helpful?, and then entering your comments and suggestions in the box. I read your comments every month and either write new or modify existing articles based on your comments.

     

    Thank you for using InfoPath!

     

    Arsenio Locsin

    InfoPath Technical Writer

  • Microsoft InfoPath 2010

    Designing browser-enabled forms for performance in InfoPath Forms Services (Part 5)

    • 2 Comments

    Part 5 – Addendum: Counters for monitoring form server performance


    Welcome to the fifth article in our series on optimizing the performance of InfoPath browser-enabled forms. In our previous articles we defined performance in terms of responsiveness, listed a number of conditions that cause postbacks, and looked at some of conditions that make postbacks more expensive, reducing the responsiveness and scalability of a form system. We also described some of the issues that affect form-rendering performance in the browser and suggested using the Design Checker to monitor browser compatibility issues while designing a form template in the InfoPath Designer.

    In this addendum article, we list some useful performance counters you can use in the Windows Performance Monitor (PerfMon) to monitor the behavior of your form server system. Using a combination of general system counters and InfoPath-specific counters to monitor the performance of your servers can help you troubleshoot issues and quantify the performance effects of changes you make to the design of your InfoPath form templates.


    System counters for monitoring your form server system

    There are two key places where performance bottlenecks can occur in your form server system, on your Web front end (WFE) servers and on your SQL Server back end. The bottlenecks that occur on the front end are normally CPU bound, while the bottlenecks at the SQL Server back end are normally either disk bound or CPU bound.

    You can use the following system counters in PerfMon to check the performance of your WFE and SQL Server systems under various load conditions. Use these counters to determine whether your servers are performing at acceptable levels and to help identify any bottlenecks.


    Counters for monitoring a WFE server system

    • CPU:
      Processor\% Processor Time\_Total
      Indicates the total CPU load on the server.

    • ASP.NET:
      ASP.NET \Requests Queued
      A linear increase of this counter with user load can indicate that an application is experiencing a bottleneck, either at the front end or the back end. Correlate with other ASP.NET counters, SQL counters, and WFE CPU counter to understand which part of the system is getting bottlenecked.

      ASP.NET\Requests Execution Time
      Use this counter to find which type of form template takes more time to execute in the server. In general, forms with managed code require more execution time than forms that don’t. If this counter and WFE CPU counter are high while the SQL transactions/second counter and SQL CPU counter are low, then the bottleneck is at the WFE side. This may be an indication that the form complexity is high or that the form has a lot of managed code.

    • Memory:
      No. of current logical threads
      If the count is increasing, then the thread stacks are leaking.

      Private bytes and No. of bytes in all heaps
      If the count of private bytes is increasing while the number of bytes in all heap counter is stable, then the unmanaged memory is leaking.
      If the count of private bytes is increasing and the number of bytes in all heap counter is also increasing, then the managed heap is building up.


    Counters for monitoring a SQL Server system

    • CPU:
      Processor\% Processor Time\_Total
      Values above 25% indicate a possible bottleneck. Values above 80% signify extreme CPU-bound SQL operations. A linear increase in CPU with user load indicates that SQL will become a bottleneck.

    • Disk:
      PhysicalDisk\Avg.DiskQueueLength\{Disk_with_SQL_DB}
      Counter should be less than 1.5 or 2 times the number of RAID disks. Correlate with % Disk time counter and Current Disk Queue counter to determine whether the disk is a bottleneck. Decrease your test load to see if the values go down.

      SQLServer:Locks\Number of Deadlocks/sec\_Total
      Value should be zero.

    • Memory:
      Pages/sec
      Non-zero value for a sustained period of time indicates that the system is experiencing a high memory load. SQL Server works best when the operating system does not reallocate its memory.


    Counters provided by the InfoPath Forms Services performance object

    InfoPath Forms Services installs a set of counters that can be viewed in PerfMon. There four types of counters provided by the InfoPath Forms Services performance object: Transaction, Session, Data Connection, and Template/Document.

    • Transaction counters represent all communication between the browser and the server. You can use the transaction counters to monitor how long postbacks are taking to complete and as a gauge for how expensive they are for the server to process.

      Avg. Transaction Duration
      The average time to complete a transaction in form-filling sessions.

      Transactions Started Rate
      The rate at which transactions started in form-filling sessions.

      Transactions Completed Rate
      The rate at which transactions completed in form-filling sessions.

    • Session counters provide duration and rate information for user form-filling sessions. If there are too many active sessions for the server to handle, you will see excessive average durations that indicate a server bottleneck.

      Avg. Session Duration
      The average time to complete a form-filling session, summed up over all transactions in the form-filling session.

      Sessions Started Rate
      The rate at which form-filling sessions started.

      Sessions Completed Rate
      The rate at which form-filling sessions completed.

    • Data Connection counters show the duration and rate of both data connection submit and query activities, along with failures. This will give you an indication of back end performance and how long data connections are taking to complete.

      Avg. Data Connection Submit Duration
      The average time to complete a data connection submit in form-filling sessions.

      Data Connection Submit Started Rate
      The rate at which data connection submits started in form-filling sessions.

      Data Connection Submit Completed Rate
      The rate at which data connection submits completed in form-filling sessions.

      Data Connection Submit Failure Rate
      The rate of failures for data connection submits in form-filling sessions.

      Avg. Data Connection Query Duration
      The average time to complete a data connection query in form-filling sessions.

      Data Connection Query Started Rate
      The rate at which data connection queries started in form-filling sessions.

      Data Connection Query Completed Rate
      The rate at which data connection queries completed in form-filling sessions.

      Data Connection Query Failure Rate
      The rate of failures for data connection queries in form-filling sessions.

    • Template/Document counters give information about the number of forms and form templates that are currently in the ASP.Net cache and in memory. These can help you monitor and detect memory utilization issues on your server.

      # of Cached Form Templates
      The number of form templates that have been added to, and not yet expired out of, the ASP.NET object cache.

      # of Business Logic Assemblies in Memory
      The number of business logic assemblies currently loaded in memory. Administrator-approved form templates may contain zero, one, or more managed code assemblies.

      # of Form Templates in Memory
      The number of form template objects that are currently loaded in memory.

      # of Cached Form Templates in Memory
      The number of forms that are currently loaded in memory.


    Server system health monitoring

    The general system counters and InfoPath Forms Services counters listed above are useful for monitoring specific issues on a server, but do not provide comprehensive health monitoring for your overall form server system. For that you need to use a solution designed to watch multiple servers for issues that may cause service or performance degradation, such as Microsoft System Center Operations Manager 2007. Operations Manager uses management packs that contain predefined rules, settings, and agents to monitor a specific service or application. For SharePoint, you can download the SharePoint Monitoring Toolkit, which contains the management packs and documentation for both Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007. Note that System Center Operations Manager also provides the capability to customize existing rules or create your own rules.

    For more information about the SharePoint management packs for Operations Manager 2007, see the SharePoint Monitoring Toolkit Executive Overview (http://technet.microsoft.com/en-us/library/bb975149.aspx).

    For more information about Microsoft System Center Operations Manager 2007, see the System Center Operations Manager TechCenter (http://technet.microsoft.com/en-us/opsmgr/default.aspx).

     

Page 7 of 12 (298 items) «56789»