Previous Topic: PCASE Function--Convert a String to Proper Case

Next Topic: RDN Function--Retrieve First Component of LDAP DN

QS Function--Retrieve Items from a Query String

The QS function retrieves items from the query string associated with the resource being accessed by the user when the expression is evaluated.

If no arguments are supplied to this function, the entire query string (and only the query string) is returned. The query string is returned unchanged.

If the string argument is supplied as a blank string (""), then all of the arguments in the query string that are unnamed are returned. If multiple values exist, they are returned as a set.

If the string argument is supplied as a non-blank string, all of the arguments in the query string that are named with a matching name are returned. Case-sensitivity is controlled by the optional Boolean flag. If multiple values exist, they are returned as a set.

Syntax

The QS function has the following format:

QS([input_string,][ not_case_sensitive])

Parameters

The QS function accepts the following optional parameters:

input_string (string)

(Optional) Name of an argument in the query string.

not_case_sensitive (Boolean)

(Optional) If the not_case_sensitive flag is set to FALSE or omitted, the function searches the query string for an exact match. If the not_case_sensitive flag is set to TRUE, the function ignores case.

Return Value

The QS function returns a string.

Example

Assume this resource: http://myserver.com/index.jsp?Test=A&X&TEST=D&c&Dbg

Return_value=QS()
Return_value='Test=A&X&TEST=D&c&Dbg'

Return_value=QS("")
Return_value='X^c'

Return_value=QS("Test")
Return_value= 'A^D'

Return_value=QS("Test", false)
Return_value= 'A'

"Dbg" IN QS("")
Return_value=TRUE

More information:

URL Function--Returns a Component of a URL String


Copyright © 2010 CA. All rights reserved. Email CA about this topic