Deep Dive into Nintex-query XML actions

Source: Internet
Author: User

We usually use the "Query XML" Action (EN: Query XML) to conveniently perform necessary operations and conversions as needed to get the desired value, and the corresponding data type (through the corresponding value assignment variable type ).

Extended XML action query function-using XSLT

See http://www.cnblogs.com/mingle/archive/2010/11/27/Nintex_GetGroupCollectionFromUser.html for details

Extended query of XML action functions-use built-in functions

Reference Functions

Fn-Abs
Returns the absolute value of a number. For example: fn-Abs ({WorkflowVariable: Number })

Parameter: Number of the absolute value.

Fn-Currency
Returns the numeric text in the currency format.

For example, fn-Currency ({WorkflowVariable: Cost }). If you input the number 9996666, fn-Currency (9996666), $9,996,666.00 is returned.

Parameter: a numeric variable that contains numeric values.

Fn-DateDiffDays
Determine the number of days for the two dates.
Format: fn-DateDiffDays ({WorkflowVariable: StartDate}, {WorkflowVariable: EndDate })

Parameter: Used as the start date and end time for calculating the difference value.

Fn-DateDiffHours
Determine the number of days for the two dates.

Format: fn-DateDiffHours ({WorkflowVariable: StartDate}, {WorkflowVariable: EndDate })

Parameter: Used as the start date and end time for calculating the difference value.

Fn-DateDiffMinutes

Determine the minute of the difference between the two dates.

Format: fn-DateDiffMinutes ({WorkflowVariable: StartDate}, {WorkflowVariable: EndDate })

Parameter: Used as the start date and end time for calculating the difference value.

Fn-DateDiffSeconds

Determines the number of seconds between two dates.

Format: fn-DateDiffSeconds ({WorkflowVariable: StartDate}, {WorkflowVariable: EndDate })

Parameter: Used as the start date and end time for calculating the difference value.

Fn-FormatDate
Returns the date and time value based on the specified date and time format.

For example: fn-FormatDate ({WorkflowVariable: MyDate}, d)

Parameter: 1. Date variable; 2. format text.

Because the format text is different from the common one, pay special attention to it. I did the following test:

Input:

Fn-FormatDate ({ItemProperty: Created}, dd-M-yyyy)
Fn-FormatDate ({ItemProperty: Created}, dd)
Fn-FormatDate ({ItemProperty: Created}, M)
Fn-FormatDate ({ItemProperty: Created}, yyyy)

Output:

16-11-2010
16
11
2010

Note: When obtaining the month of a date, the format text must be "M" (M is followed by a space ).

Fn-Insert
Insert text into a string.

Format: fn-Insert ({WorkflowVariable: Text}, 4, {ItemProperty: Title })

Parameters:

Text: The Source string to be modified.
Start: the position where the new string will be inserted. the Start position of the source string is 0.
New text: the inserted string.

Fn-Length
Returns the string length.

For example: fn-Length ({WorkflowVariable: Text })

Parameter: Used as a string to calculate the length.

Fn-Max
Compare the two numbers and return the maximum value.

Format: fn-Max ({WorkflowVariable: Number1}, {WorkflowVariable: Number2 })

Parameter: Number 1: the first digit used for comparison. Number 2: the second digit used for comparison.

Fn-Min
Compare the two numbers and return the minimum value.

Format: fn-Min ({WorkflowVariable: Number1}, {WorkflowVariable: Number2 })

Parameter: Number 1: the first digit used for comparison. Number 2: the second digit used for comparison.

Fn-NewGuid
Generate a globally unique identifier.

Format: fn-NewGuid ()

Fn-PadLeft
Fill the provided string with the specified string from the right to the left (right to align) to increase its total length to the specified length. If the total length of the provided string is greater than the specified number, it will not be filled.

Example

Fn-PadLeft ({WorkflowVariable: Text}, 6)

Fn-PadLeft ({WorkflowVariable: Text}, 6 ,-)

Parameters:

Text: the string to be filled.

Number Length: the total Length of the target string after it is filled.

Character Optional: Optional string to be filled. The default filling character is space.

Fn-PadRight
Fill the provided string with the specified string from left to right (align left) to increase its total length to the specified length. If the total length of the provided string is greater than the specified number, it will not be filled.

For example:

Fn-PadRight ({WorkflowVariable: Text}, 6)

Fn-PadRight ({WorkflowVariable: Text}, 6 ,-)

Parameters:

Text: the string to be filled.

Number Length: the total Length of the target string after it is filled.

Character Optional: Optional string to be filled. The default filling character is space.

Fn-Power
Raises a number to the specified power.

Example

Fn-Power ({WorkflowVariable: Number}, {WorkflowVariable: Power })

Arguments

Number The number to raise to the power.
Number The power to raise number.

Fn-Remove
Removes a section of text in a larger string.

Example

Fn-Remove ({WorkflowVariable: Text}, xxx, {ItemProperty: Title })

Arguments

Text The text to modify.
Start position The character position from which to remove the following characters. The first character in the string is at position 0.
Length Optional. The number of characters from the start position to remove. All remaining characters will be removed by default.

Fn-Replace
Replaces a section of text in a larger string.

Example

Fn-Replace ({WorkflowVariable: Text}, xxx, {ItemProperty: Title })

Arguments

Text The text to modify.
Old value The text to search for and replace.
New value The text to replace Old value.

Fn-Round
Rounds a decimal value to the nearest integer.

Example

Fn-Round ({WorkflowVariable: Number })

Arguments

Number The decimal number to round.

Fn-SubString
Extracts a portion of text from a string.

Example

Fn-SubString ({WorkflowVariable: Text}, 5, 10)

Arguments

Text The text to extract a value from
Start index The position in the text of the first character to retrieve. The first character in the string is at position 0.
Number of characters The number of characters to retrieve from the start index.

Fn-ToLower
Formats text in a string to all lower case.

Example

Fn-ToLower ({WorkflowVariable: Text })

Arguments

Text The string to convert to all lower case.

Fn-ToTitleCase
Formats text in a string to title case.

Example

Fn-ToTitleCase ({WorkflowVariable: Text })

Arguments

Text The string to convert to title case.

Fn-ToUpper
Formats text in a string to all upper case.

Example

Fn-ToUpper ({WorkflowVariable: Text })

Arguments

Text The string to convert to all upper case.

Fn-Trim
Removes leading and trailing whitespace from a string.

Example

Fn-Trim ({WorkflowVariable: Text })

Arguments

Text The text to remove leading and trailing whitespace characters from.

Fn-XmlEncode
Encodes a string to make it safe for viewing in html.

Example

Fn-XmlEncode ({WorkflowVariable: Text })

Arguments

Text The text to encode.

Fn-XmlDecode
Decodes a html safe string to regular text.

Example

Fn-XmlDecode ({WorkflowVariable: Text })

Arguments

Text The text to decode.

Example 1 get the current year

 

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.