Infopath + designer WorkFlow Design 2-WorkFlow Design

Source: Internet
Author: User

Preparations

There is a part of manager in the process. In order to automatically solve the applicant's department manager, there is a list library to store the department manager of each department for future maintenance, the fields in the department manager list include:

Serial number

Field name

Type

Remarks

1

Department name

Single Line Text

Department name.AdThe Department fields on are consistent.

2

Department Manager

User or user group

Department Manager inAdAccount in

3

Account

Single Line Text

Department Manager inAdAccount in. This field is of the text type and is used when a task is assigned in the process.

 

After the creation is complete, it is shown as follows:

Set the Department for all employees in AD. The value should be the value in the department manager list library.

Inpath Form Design

The design is as follows:

Create a data source

Create a data source as follows:

Each section in the form is used as a folder for search, and the ID, file name, and workflow status exist as the whole form data.

The data source in infopath has two types of domains:

Field (element ):When a field of this type is released and upgraded to a field, the data in the list library cannot be edited and expressed in infopath, because the Application Form (fields in the hotel reservation Application Information Section) is filled in upon application and cannot be modified after submission, all fields in the application form use the field (element ).

Domain (attribute ):After a field of this type is upgraded to a field during release, the data in the list database can be edited and expressed in infopath, because the subsequent approval and Arrangement Information are filled in through the workflow, all these fields use the domain (attribute) type.

After the data source is created, you can design the form. As for the form design, it depends on everyone's aesthetics. Here: the transfer information is actually a multi-text editor, but its border and shading are removed in the format.

Add condition format

When a user initiates an application, the form should not be the whole form, but the content in the hotel reservation application information section. At the same time, the form content can be seen through various steps, it should also be the form content that has passed through the link, and the form should not be displayed before the process link is reached.

The Department Manager approval section is set to hide this section when the department manager's approval comments are blank (in this case, the department manager must fill in the approval comments column during approval, or use other conditions to determine whether the section is hidden)

Administrative staff arrangement:

Approval Process:

Because the self-payment type requires a department manager, the drop-down list of the department manager must also have a condition format, that is, when the payment type is not the same as the company payment, the control is disabled, the settings are as follows:

Add and submit button

Add a button to the form and click it to submit the form to the form library. do the following:

Test form:Verify that the form is correct. If not, submission is not allowed.

Generate the Form file name:When submitting a form to the form library, a file name must be included and the file name must be unique in the form library. Therefore, we need to generate a file name for the current form.

Submit data:Save the current form to the form library

Close the form:Back to list Library

Double-click the button and click the rule in the Properties dialog box. The final result is as follows:

Clearing error message rules:

Condition:Null

Operation:Set error information to null

Check Form rules:

Condition:Payment type = "company payment" and the department manager is blank

Operation:Redeployment error message = this application requires a department manager. Select a department manager.

Set file name rules:

Condition:Null

Operation:Set File Name field = translate (substring (translate (now (), ":", ""), 1, 20 ),"-",""), "T ","-"). In the format

Data submission rules:

Condition:Workflow status is empty and error message is empty

Operation 1:Set the working status = the workflow is being started. Please refresh

Operation 2:Use data connection for submission

Click "add" to create a data connection and submit the wizard.

Select New connection. Because data is submitted, select submit data only here.

List library submitted to SharePoint

Set the form library address (that is, the address to which the current form library is published to the server) and the file name of the current form

Close form rules:

Condition:Error message is blank

 

Operation:Close form

Finally, because the user does not allow the user to modify the form content after submitting the form, add a condition format to the button: If the workflow status is not empty, the control is hidden.

Set initialization data

When a user creates a new application, some data must be filled in automatically. The most important initial data includes two items: User Name (current user name ), department (name of the current user's Department) and department manager of the current user's department.

Current User

A WebService is provided in Sharepoint, through which you can directly obtain the basic information of the current user. The interface address is: http: // server address/_ vti_bin/userprofileservice. asmx? WSDL. If this interface is used, create an auxiliary data connection and set the user name and Department of the form.

Select tool> data connection> Add,

Enter the interface address

Select the getuserprofilebyname method.

Set by default

Follow the default settings to create a data connection.

After creating a data connection, switch the design task in the right column to the data source, double-click the applicant, set its default value, and click the FX formula button next to it.

Select Insert domain or group. In the pop-up data source, switch to the new data source.

Select filter data and create a filter in the pop-up window:Name = preferrednameThat is, the data here is the user'sPreferrednameThis field value represents the user's name.

The filter names that can be used here are all from the sharing service. You can use the sharing service to view the attributes of the configuration file and all the fields that can be used.

Select a field and click Edit.

For example, the user name used above is the name field in the user configuration file, corresponding to preferredname

Set the default value of the user department as shown in the preceding method. The filter condition here is: Name = Department

Department Manager

In preparation, we created a new list library, where you can store department managers of each department. before using this list library, we need to import the list library to infopath and convert it into a database. Like creating the current user above, first add a data connection through tool => data connection

Enter the address of the Department List Library

Select the team manager Library

Select fields contained in the Data Source

Next, follow the default settings to create a secondary data connection. After the data connection is created, a drop-down list is used to display the department manager, therefore, when setting the department manager of the current user, you need to fill in the data contained in the data source that you created first to this drop-down list.

Double-click the department manager drop-down list and set the data source as follows:

After filling in the drop-down list, you can set the default value of the current user's department manager. in the right column, switch the design task to the data source view, double-click the department manager field, set its default value, and select insert formula.

Select Insert domain or user group. In the displayed window, the data source is the department manager and a filtering condition is added.

Add a filter and select an expression as the type,

Value :.. // @ Department name = xdxdocument: Get-dom ()/My: myfields/My: Estimated hotel application information/My: applicant department .. // @ Department name: the value of this field for the department name of each data entry of the department manager data source

Xdxdocument: Get-dom ()/My: myfields/My: Estimated hotel application information/My: applicant department: value of the user department field in the current form

Release form

Set form options

Before publishing a form, set some options of the form.

Because the submit button is used to submit a form, you must hide the SAVE and other menus in the toolbar. Some users still need to print the form, therefore, the print View menu is left here. If printing is not required, you can hide the entire toolbar.

Attribute enhancement: promotes all fields to a column in the form. You can also perform this operation during release.

Release form

Due to the release process,ProgramA form library is automatically created, but the form library address is generally a name without comments. To make the form library name easy to remember and easy to migrate, we recommend that you first create a blank form library on the server, enter an English name for the new form library name, and save it before changing it to a Chinese name.

Select File => Publish, and select publish to the deployment poit server.

Select the website address to publish

Make sure that you can enter this form in your browser.

Since we have previously created a form library, you can select update here to use this form library.

Set the attributes to be upgraded. If you have already set the attributes in the form option settings, you do not need to set them again.

After the form is published, go to the advanced settings on the settings page of the form library and select "display as webpage" to open the form in the browser.InfopathForm

This article is from the csdn blog. For more information, see file: // F:/sharepoint2007/designer workflow webpage/workflow.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.