Infopath [function]-(substring-before, substring-after, Concat) Clever Use

Source: Internet
Author: User

[Original]

1. Create a staffing list, including the Logon account, display name, department, department manager, and other columns.

2. Duplicate contact data table. The display names in the personnel configuration table are referenced for personnel selection and deletion. Support multiple selections for maintenance personnel. You can delete and select a person if a person is deleted.

1. Maintenance Personnel Selection. If there are three maintenance personnel:

The current user account is username ();

The current user name is @ display name [@ Logon account = Current User Account];

The default value of the maintainer is the current user name;

Maintenance personnel rules: Set -- Maintenance Personnel Manager name = @ department manager [@ display name = Current ()];

The maintainer selects the general rule preview. If the effect is achieved, set the maintainer: 1 Zhang, 3 Wang, 5 Wang, 3 Li, 6 Li:

<1> select rule 1 for the maintainer. For example, if the default value of tag is 0, set tag for initialization tag = [tag] + 1:

<2> select rules for maintenance personnel 2. For example, set [maintenance personnel] = [maintenance personnel] + [Mark] + [Maintenance Personnel Selection] Concat function usage:

 

<3> select rules for maintenance personnel 3. For example, set [Maintenance Personnel Manager name] = Concat (Maintenance Personnel Manager name, Tag, @ department manager [@ display name = Current ()]) concat function usage:

 

2. Maintenance Personnel deletion. If a person deletes the display name marked as 1, the maintenance personnel marked as 1 will be deleted:

Maintenance Personnel Delete general rule preview. If the effect is achieved, you can set maintenance personnel. When a person deletes the person, select Michael Jacob, and the final result is-2 Wang Wu 3 Li Liu:

<1> maintenance personnel Delete rule 1, such as the use of substring-before, string-length, and substring functions:

Condition: maintenance personnel include maintenance personnel to be deleted;

Set: Mark 1 = substring-before (maintenance personnel, maintenance personnel delete); Note: Read the string before [maintenance personnel delete.

Settings: Mark 2 = substring (mark 1, string-length (mark 1), 1); Note: obtain the string at the position of '(string-length (marked as 1)' before the string is deleted by the maintainer.

Set: Mark 3 = substring (mark 1, string-length (mark 1)-1, 1); Note: obtain the string at the position of '(string-length (marked 1)-1' before the maintenance personnel deletion, which is used to mark two digits.

<2> maintenance personnel Delete rule 2, for example:

Condition: the maintenance personnel include the maintenance personnel to delete, mark 3> = 1, mark 3 <= 9; (Note: Determine whether the [Mark] is one-digit or two-digit)

Set: bid = 1;

<3> maintenance personnel deletion rule 3, such as substring-before, Concat, substring-after function usage:

Conditions: [maintenance personnel] include [maintenance personnel DELETION], [digit mark] = 1; (Note: [Mark] is 2 digits)

Set: Maintenance Personnel = Concat (substring-before (maintenance personnel, Concat (mark 3, Mark 2 ,.)), substring-after (maintainer, Concat (mark 3, Mark 2 ,.))); note: Obtain the string after 'Mark' + maintenance personnel Delete '+' Mark '+ maintenance personnel Delete;

Maintenance Personnel Manager name = Concat (substring-before (Maintenance Personnel Manager name, Concat (mark 3, Mark 2, @ department manager [@ display name = Current ()]), substring-after (Maintenance Personnel Manager name, Concat (mark 3, Mark 2, @ department manager [@ display name = Current ()]); note: obtain '[Mark] + [@ department manager [@ display name = Current ()])] 'previous string + '[Mark] + [@ department manager [@ display name = Current;

Note: "." indicates [deletion of maintenance personnel ];

<4> maintenance personnel deletion rule 4, such as substring-before, Concat, and substring-after function usage:

Condition: [maintenance personnel] includes [maintenance personnel DELETION] and [number of digits Mark] = 0 (Note: The default number of digits mark is 0 );

Set: Maintenance Personnel = Concat (substring-before (maintenance personnel, Concat (Mark 2 ,.)), substring-after (maintainer, Concat (Mark 2 ,.))); note: Obtain the string after 'Mark' + maintenance personnel Delete '+' Mark '+ maintenance personnel Delete;

Maintenance Personnel Manager name = Concat (substring-before (Maintenance Personnel Manager name, Concat (Mark 2, @ department manager [@ display name = Current ()]), substring-after (Maintenance Personnel Manager name, Concat (Mark 2, @ department manager [@ display name = Current (); note: obtain '[Mark] + [@ department manager [@ display name = Current ()])] 'previous string + '[Mark] + [@ department manager [@ display name = Current;

<5> maintenance personnel deletion Rules 5:

Next, you can set the [tag] bit to three. Don't say no ......

This article is the painstaking work of the author. Please mark the source for reprinting ......, Thank you for your cooperation !!!

We will share the form download in the future. Please wait ......

Csdn

 

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.