All of the data that appears in a form, whether this is data that a user can select in a list box, drop-down list box, or combo box, or the data that a user adds to a form, is stored in the form's data sources. A data source is made up of fields and groups. In the same way that folders on your hard disk contain and organize your files, fields contain the data that users enter into forms that are based on your form template, and groups contain and organize those fields.
The user adds data to controls on a form, and those controls are bound to these fields. For example, imagine that you are designing a form template for an expense report. When users open a form based on your form template, they can put their first, middle, and last names into three text box controls — each text box is bound to a field for the first name, a field for the middle name, and a field for the last name.
These name fields are contained in a group called "name. You can see and work with the fields and groups in your form template's data source in the Data Source task pane. Although the structure of the data source does not always match the layout of your form template, similarities are common, particularly for groups and fields that are associated with repeating tables, sections, repeating sections, and optional sections. For example, a table or section is bound to a group in the data source, and all of the controls in the table or section are bound to fields that are part of that group.
In the following illustration, the Itemized Expenses repeating table in the expense report form consists of three columns that contain a Date date picker, a Description text box, and a Cost text box. These controls are bound to a date field, a description field, and an amount field, respectively. The table itself is bound to the item group. A form template can have two types of data sources — a single, main data source, and optionally, one or more secondary data sources.
The data that users add when they fill out a form that is based on the form template, such as the data that they enter into a text box. For example, the user types their first, middle, and last names in text boxes that are bound to fields in the main data source. The data from a data connection to a database or Web service, which is used to define the data source of the form template. The data in the main data source is what users save or submit when they fill out the form.
When users save the form so that they can submit it later, users are saving the data in the main data source. When you create a form template, Microsoft Office InfoPath automatically creates the main data source for you. All InfoPath form templates contain a single, main data source. Fields and groups can be added to the main data source, depending on the type of form template you create:.
Blank form template You add fields and groups to the main data source by using the Data Source task pane or by dragging a control from the Controls task pane onto a view in the form template.
When you drag a control onto a view, InfoPath adds fields and groups to the main data source according to the type of control you are adding. For example, if you drag a text box control onto your form template, InfoPath adds a field to the main data source. If you drag a repeating section control onto your form template, InfoPath adds a group to the main data source.
If you drag a repeating table control onto your form template, InfoPath adds two groups to the main data source for the repeating table and adds a field to the main data source for each column in the table.
Form template based on an XML document InfoPath adds fields and groups that map to the elements that are defined in the schema or to the elements in the document. Form template based on a Microsoft Office Access database or Microsoft SQL Server database InfoPath adds fields and groups to the main data source, based on the way that the database stores data.
Form template based on a Web Service InfoPath adds fields and groups that map to the schema that is supplied by the Web service. If the data source — for example, a Web service or database — is not contained in the form template, it is referred to as an external data source. InfoPath forms connect to these external data sources through a data connection.
You can add additional fields and groups to the main data source, depending on the existing fields or groups in the main data source. The following table outlines what you can add to existing fields or groups, based on the icons that appear in the Data Source task pane. Group icon You can add groups or fields to this group. This icon represents either a group that was added to the main data source by using the Data Source task pane, or a control associated with this group that was dragged from the Controls task pane onto a view in a blank form template.
Field icon You can add only fields to this field. This icon represents either a field that was added to the main data source by using the Data Source task pane, or a control associated with this field that was dragged from the Controls task pane onto a view in a blank form template. Locked group icon You cannot add fields or groups to this group. This group is based on a data connection to an external data source. Locked field icon You cannot add fields to this field.
This field is based on a data connection to an external data source. If you drag a control onto a view in a form template, and that form template contains fields and groups that are based on a data connection, you must bind that control to the existing fields and groups in the main data source. InfoPath does not automatically add fields and groups to a form template that contains fields and groups that are based on external data sources.
Find links to more information about adding fields and groups in the See Also section. Note: If your users already filled out forms that are based on your form template, the following changes to the form template's main data source can cause data loss in those forms:. Each name in the main data source must be unique. If you must use the same name for more than one field or group, create a reference to that field or group instead.
When you create a reference to a field or group, InfoPath creates a new, identical field or group whose properties are linked to the properties of the first field or group. Any changes to one field or group automatically update the other, referenced field or group.
Reference groups, like reference fields, contain the same fields and groups and share the same properties. In addition to these requirements, it is a good idea to use a name that describes the contents of the field or group. For example, if you have a group that contains the itemized details of expenses, name the group ItemizedExpense. For a field in a group that contains the amount of the expense, name the field expense.
Type Defines whether an item in the main data source is a field or a group. A field has a unique value, and a group contains other fields. Use this type if the group can contain only one of several different types of fields or groups of fields. For example, imagine that you are designing a form template that suppliers in the United States and in countries and regions in the European Union will use, and your form template contains an address choice group.
The address choice group contains a group with fields for an address in the United States or a group with fields for an address in a country or region in the European Union. When the user opens the form that is based on this form template, the user can choose to enter an address in the United States or an address in another country or region. The controls that are bound to the fields in the appropriate group appear on the form.
Data type Defines the kind of data that a field can store. Use this data type for an element field that contains formatted text. You cannot use this data type for attribute fields. Use this data type for an element or attribute field that contains numbers without decimal values.
Use this data type for an element or attribute field that contains currency values or numbers with decimal values. Use this data type for an element or attribute field that contains data that can be only one of two values.
Use this data type for an element or attribute field that contains a Uniform Resource Identifier URI , such as a hyperlink or a namespace. Use this data type for an element or attribute field that contains both a calendar date and a hour time.
Use this data type for an element or attribute field that contains binary data, such as an image or a picture. Use this data type for an element or attribute field with custom data types that are defined by a namespace. This data type is typically used for a field or group that is bound to a custom control. The Data namespace box is enabled when you choose this data type. Note: This table shows only the most common XML data types used in a form template. To use a data type that is not listed in the table, you must extract the form files for a form template and edit the schema.
Find links to more information about extracting the form files for a form template in the See Also section. This property is available for element or attribute fields with a Custom data type property. When you add a custom control to a form template, this property usually contains a value that is defined by the author of the custom control that is bound to the field.
Default value Defines the initial value of an element or attribute field when the form is first opened by a user. You can also add formulas to default values, such as the current date, a mathematical calculation, or a reference to another field. Multiple-Selection List Box: Similar to a list box, but it allows the user to select multiple items.
Drop-Down List Box: Allows a long list of items to be displayed without taking up much screen space. Option Button: Also know as a Radio button, it allows users to assign a variable value to an item such as providing their opinion on an interaction e. An Options button is generally used if the list has seven or fewer items.
Section: The generic name for a group of related controls. Repeating Section: Allows users to add as many items as needed, such as a list of dependents on an insurance application, or a list of past positions on a job application.
Repeating Table: Similar to a repeating section, but in a tabular format, useful for entering outlays on an expense report, for example. File Attachment: Allows users to upload a file to the form. Picture Control: Similar to the file attachment, but for pictures.
Hyperlink: A link to an external website or to another form. Expression Box: Also known as Calculated Value, an Expression box is used for showing the results of calculations that need to appear as text. For example, when a form displays information about items selected, an expression box can be used to display the total price or the total number of items. Choice Group: This element controls mutually exclusive sections on a form. For example, if a user needs to pick the option of ordering a Mac or Windows computer.
Choice Section: The option picked in the choice group will drive what displays in the choice section. Continuing with the example above, if Windows is chosen, then the choice section will show the available computers that run that OS.
External Item Picker: An element that allows the form to pull data from an external data source. If the form is stored on a SharePoint site, and also retrieves data from a database, then the database is considered an external data source. The experiences are similar. The only difference is that in a browser window, toolbars appear across the top and bottom of the form. The toolbars display options for saving, closing, printing, and updating the form that is shown in menus in the Filler app.
Brower based forms have more limited functionality than InfoPath Filler forms which run in the InfoPath client application. Microsoft SharePoint Depending on the company policy and security needs, some form creators must publish the template to a shared location on their corporate network, then contact a server farm administrator for assistance making it available on the server.
If administrator approval is required, the Publishing Wizard walks through preparing the template for hand-off to an administrator. Search for: X. Publish date: November 25, November 21, - Last modified date: November 21, Author: Adriana Neagu Ms.
The main ones are: SharePoint Foundation is the default storage location for data submitted through InfoPath form it can be stored as a list forms or in a form library. A form library on SharePoint has InfoPath templates as its designated document type.
Filler: Allows someone to fill out forms created in InfoPath. If not, the form will open in the default browser. Forms Services: A server technology that ensures a form stored on a SharePoint Foundation server will display properly in a web browser. The Current State of InfoPath Microsoft announced in that it is discontinuing the application, making the final version.
Some Common InfoPath Tasks An InfoPath form template is an XML document that defines the layout and editing behavior, enforces rules to ensure data consistency, and provides the routing information that indicates where to store the data.
Basic Steps to Create a Template Make a plan. When creating an InfoPath template, the first step is to plan the design of the form. Ask these questions to guide the plan: How will it be used? What data will need to be displayed? What will the form look like? What style will the tables have? What data will be collected?
Are any parts of the form read-only? Will the form be a single page or have multiple pages? If multiple pages, will data entered into a page affect what appears on pages that follow? Select a template type. Choose a layout. Each template type has a default layout, or the creator can customize the position of the on-screen elements. Add data connections.
These connections will determine where the submitted data is stored, and where any data displayed comes from when the form is viewed. Add fields and controls. Fields are where data is stored. Controls are where users input their data, whether via typing or by selecting from displayed items.
If desired, add views pages. Views will present versions of the form to different users based on factors that the form creator can control. Add rules and business logic to respond to conditions, inputs, and business needs. Rules can display messages, set a value in a field, get data or store data, change views, or open another form. Conditions can include calculations, user roles, the status of a field, what value is entered, and more.
Publish the template to make the form available to users. Use the InfoPath publishing wizard to publish the form. Note: Some forms may have compatibility issues when converting to web forms.
InfoPath will provide notifications if this happens. Task Form A task form is a generic name for a form that allows a task to be completed. Approval Form An approval form template will create a workflow that allows a number of users to approve actions, documents, or the status of a project. Email a Form One option for getting data that users entered into a form is to have it emailed. The form will appear as a default two-column SharePoint table. Modify the layout, rules, and validation to meet your needs.
Adding new fields to the InfoPath form will create new columns in the SharePoint list. Dynamic behavior can be added with control rules for example rules validate that a date has the correct format or that a ZIP code is numeric. To add a rule, click Home tab, then in the Rules group, click Add Rule. Once all changes are made, click the File tab, then Quick Publish. When prompted to save the list, click OK. External Users: PowerApps allows only recognized users within an organization verified by a directory to access and fill out forms.
InfoPath Tip, Tricks, and Best Practices There are a number of ways to improve performance and the overall user experience when designing a form or template. Performance Improvement Tips Keep the form as simple as possible to perform the required function.
Avoid nested tables and nested repeating elements. A flat structure will load faster and save faster. Be thoughtful about what data is retrieved when the form is opened. Avoid multiple data connection queries. Delete unused fields when updating a form. Store photos and large files elsewhere rather in the form or a SharePoint Environment. Frequent server posts that occur in a form will result in poorer performance. Unless the formatted text is absolutely required, avoid Rich Text Boxes as they create excessing formatting data.
User Experience Tips Design with the user in mind. Make sure the fields flow in a logical order and are easy to read. Be thoughtful about the length of the form. A multipage form may be easier for users than one long-form. Enable submit functionality in the form template, even if the form is auto-submitting.
0コメント