Argument Value

Get the value of an argument submitted in the current request.
argument-value name [type]

Returns the value of the search argument or post argument that matches the name, if any. The name should preferably be a keyword or optionally a string.

The optional type specifies the format of the returned value. The function by default returns a string. The type can be any of the following:

'number
Returns the argument value as a number.
'keyword
Returns the argument values as a keyword.
'list
Returns all arguments mathing the name as a list of strings.
'values
Returns multiple values with all arguments mathing the name (collect using Common LISP's MULTIPLE-VALUE-BIND or related constructs).

(define-entity answer ()
 "The value of a submitted field labeled 'answer'"
 (argument-value "answer"))

(multiple-value-bind (a b c)
 (argument-value :choices 'values))

Interaction Developer Reference


This site is enhanced with Interaction.