Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

max

max

The max XQuery function is used to find the maximum value in a sequence of atomic values.

Syntax

fn:max(arg, collation)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg
Required
The sequence of values.
collation
Optional
A string used to specify the collation for string comparisons. It defines how string comparison is performed. If not provided, the default collation applies. This parameter is relevant when comparing strings.

Return Value

  • The function returns the maximum value from the input sequence.
  • If the sequence is empty, the function returns an empty sequence.
  • If the sequence contains more than one maximum value, the first occurrence is returned.
  • If the sequence contains values with mixed data types, an error occurs.
  • NULL if all values passed to the function are NULL.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:max( (2, 1, 5, 4, 3) )
5
fn:max( ('a', 'b', 'c') )
c
fn:max( (xs:date('1999-04-15'), current-date()) )
Current date
fn:max( 2 )
2
fn:max( () )
()

0 COMMENTS

We’d like to hear from you!