SharePoint: Scale dvwp-Part 2: Modify the form operation workflow on the remove template

Source: Internet
Author: User
Tags xsl
ArticleDirectory
    • Workflow

Previously, we learned about this in part 1 to Part 2. At that time, we created a form operation workflow.

But do not ignore this article. This is because we will mention a lot of things that require special attention.

In the previous article, the terminated and resigned buttons were created, but now they are still the same as the Save link in the edit template. So, let's continue to complete their modifications.

1. In SharePoint designer (SPD), right-click terminated and select form actions

Be careful with traps !!! 
2. If you have created [custom action] For your template editing, it will be displayed here. Do not click Settings! Otherwise, you will open the workflow associated with the Save button in the edit template.

On the contrary, click [custom action], click <delete, and then confirm. This operation will delete all connections to the save workflow.


Delete an existing [custom action] to disconnect a form operation from it.
3. Right-click terminated and select form actions again.
4. Click [custom action], and then click Add> to associate a new workflow for the link.

5. Click move up to execute the workflow first.


Now you can design the workflow for this form operation from scratch.

6. Then, you can click Settings... Click to start workflow configuration.

Workflow

Previously, we used spservices in presaveaction () to write data to the audit list. We also discussed how to use form data and more variables for workflows.

Since we have converted the field control except valid data into a label, we can access them from the workflow. We will use the create list item operation to create list items:

1. Select the audit list. All required fields are automatically displayed. Click modify... Then select the appropriate form field value:


The required field is automatically added to the create new list item dialog box.
2. When it is the turn to change type, select terminate from the option field list


3. After you finish, click OK, finish, and OK. (If you come back and edit it here, pay attention to the following traps before clicking the second OK)
4. Write down the workflow ID in the pop-up window. (You may need to add some comments to your XSLT to make it easy to find this number in future work .)


5. Repeat the above process on the resign button.

Be careful with traps !!!

If you have previously used Part 1: To pass the method in the workflow variable in the form operation workflow, do not click the second OK. This will overwrite the modifications to the variables passed in your workflow.

Remember that form operations and workflows are two independent entity forms. To access the fields in your form and the variables in the workflow, you need to go through Part 1 of the process. However, if you do not want to overwrite your variables, do not click OK on the form operation after completing the initial workflow creation.

After the template is complete, switch to the remove template through the design pane and change the Template Name back. From:

 
<XSL: Template Name = "dvt_1.rowremove"> <XSL: Param name = "POS"/> <tr>... </tr> </XSL: Template> <XSL: Template Name = "dvt_1.rowedit"> <XSL: Param name = "POS"/> <tr>... </tr> </XSL: Template>

Restore...

 
<XSL: Template Name = "dvt_1.rowedit"> <XSL: Param name = "POS"/> <tr>... </tr> </XSL: Template> <XSL: Template Name = "dvt_1.rowremove"> <XSL: Param name = "POS"/> <tr>... </tr> </XSL: Template>

Next time, We will continue to expand the dvwp journey, add some filters and tabs, so that the information is easy to distinguish, and thus combine them into a set that is easier to maintain.

 

References

SharePoint: extending the dvwp-part 29: modifying form action workflows on the remove template

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.