This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Representing values with structures

One of the most frequently used data structures is ARValueStruct. This structure stores values of any data type.

Many functions, such as ARCreateField and ARGetField, take parameters of type ARValueStruct directly. Other functions use parameters that contain ARValueStruct, such as ARQualifierStruct and ARFilterAction.

Structures used to represent any value 

 

ARValueStruct has the following elements:

Data Type

Integer that specifies the data type of the passed value (see the following table).

Value

Value to pass (represented by data types or structures appropriate to the type of value).


0

AR_DATA_TYPE_NULL

Specifies NULL value.

1

AR_DATA_TYPE_KEYWORD

Integer that specifies the particular keyword (defined in the ar.h file).

2

AR_DATA_TYPE_INTEGER

32-bit signed integer.

3

AR_DATA_TYPE_REAL

64-bit floating-point value.

4

AR_DATA_TYPE_CHAR

A null-terminated string that requires freeing allocated space. A NULL pointer of this type is equivalent to using AR_DATA_TYPE_NULL .

5

AR_DATA_TYPE_DIARY

Null-terminated string that requires freeing allocated space. A NULL pointer of this type is equivalent to using AR_DATA_TYPE_NULL .

6

AR_DATA_TYPE_ENUM

Set of integers (beginning with zero) that represents possible selection values as an indexed list. You must specify a field limit by using ARNameList to define string values for each selection (see Lists and structures).

7

AR_DATA_TYPE_TIME

UNIX-style date/time stamp (number of seconds since midnight January 1, 1970).

8

AR_DATA_TYPE_BITMASK

32-bit unsigned integer in which each bit represents a flag turned on or off.

9

AR_DATA_TYPE_BYTES

List of bytes containing binary data (represented the ARByteList structure).

10

AR_DATA_TYPE_DECIMAL

Fixed-point decimal field. Values must be specified in C locale, for example, 1234.56 .

11

AR_DATA_TYPE_ATTACH

Attachment field.

12

AR_DATA_TYPE_CURRENCY

Currency field. The numeric part of the values must be specified in C locale, for example, 29.99 .

13

AR_DATA_TYPE_DATE

Date field. The value (known as the Chronological Julian Day) is the integer number of days since January 1, 4713 B.C. The highest valid date is January 1, 9999.

14

AR_DATA_TYPE_TIME_OF_DAY

Time of day field. The value is the integer number of seconds since 12:00:00 a.m.

40

AR_DATA_TYPE_ULONG

32-bit unsigned integer.

41

AR_DATA_TYPE_COORDS

List of ( x, y ) coordinate pairs.

Note

When a diary value is passed to the ARCreate Object or ARSet Object functions, the ARValueStruct value is the additional text to append to the diary field. When diary values are retrieved or passed to ARMergeEntry, the ARValueStruct value is a diary-formatted string containing the full diary text. To decode this string into an array of time-stamped entries, use the ARDecodeDiary function.

Was this page helpful? Yes No Submitting... Thank you

Comments