Error: Invalid spaceKey on retrieving a related space config.

ARGetMultipleAssociations

Note

You can continue to use C APIs to customize your application, but C APIs are not enhanced to support new capabilities provided by Java APIs and REST APIs.

Description

Retrieves information about multiple associations from the specified server. The function performs the same action as ARGetAssociation but is easier to use and more efficient than retrieving information about multiple forms one by one.

Information is returned in lists for each item, with one item in the list for each form returned. For example, if the second item in the list for existList is TRUE, the name of the second form is returned in the second item in the list for assocNameList.

Privileges

BMC Remedy AR System administrator.

Synopsis

#include "ar.h"
#include "arerrno.h"
#include "arextern.h"
#include "arstruct.h"

int ARGetMultipleAssociations(
      ARControlStruct               *control,
      ARTimestamp                   timestamp,
      ARNameList                    *nameList,
      ARBooleanList                 *existList,
      ARNameList                    *assocNameList,
      ARNameList                    *primaryFormList,
      ARNameList                    *secondaryFormList,
      ARQualifierList               *primaryFormQualList,
      ARQualifierList               *secondaryFormQualList,
      ARAssociationMappingInfoList  *keyMappingList,
      ARBooleanList                 *enableList,
      ARInternalIdList              *enforcementInfoList,
      ARInternalIdList              *cardinalityinfoList,
      ARTextStringList              *descriptionList,
      ARTextStringList              *helpTextList,
      ARTimestampList               *timestampList,
      ARAccessNameList              *ownerList,
      ARAccessNameList              *lastChangedList,
      ARTextStringList              *changeDiaryList,
      ARPropListList                *objPropListList,
      ARStatusList                  *status)

Input arguments

control

The control record for the operation. It contains information about the user requesting the operation, where that operation is to be performed, and which session is used to perform it. The user and server fields are required.

To specify whether to search for an object's real or resolved name, use the AR_SESS_CONTROL_PROP_API_OVERLAYGROUP variable of the ARSetSessionConfiguration function (see ARGetSessionConfiguration). For calls that use field or view IDs, the search is performed on the real or resolved name of the associated form.

If you do not use the AR_SESS_CONTROL_PROP_API_OVERLAYGROUP variable, the BMC Remedy AR System server uses the default overlay group at run time. For information about configuring the default overlay group, see the description for Overlay-mode in Configuration settings N-R.

timestamp

A time stamp that specifies the last change to the value. Specify NULL for this parameter if you do not want to retrieve this value.

nameList

The names of the associations to retrieve.

primaryFormList

A list of primary forms. See ARCreateAssociation for a description of the possible values. Specify NULL for this parameter if you do not want to retrieve this value.

secondaryFormList

A list of secondary forms. See ARCreateAssociation for a description of the possible values. Specify NULL for this parameter if you do not want to retrieve this value.

primaryFormQualList

Qualification list associated with specified primary form. If the value is NULL or 0 (AR_COND_OP_NONE), it retrieves records unconditionally. For more information about qualifications, see Associations Qualifications.

secondaryFormQualList

Qualification list associated with specified secondary form. If the value is NULL or 0 (AR_COND_OP_NONE), it retrieves records unconditionally. For more information about qualifications, see Associations Qualifications.

keyMappingList

This mapping list contains information about the AssociationType depending upon the type of association: Direct or Indirect association.

enableList

A list of flags that specify whether the association is disabled (0) or enabled (1). A value of 0 disables the association, causing it to be invisible to the user and unavailable for use. A value of 1 enables the association, causing it to be visible and available for use. Specify NULL for this parameter if you do not want to retrieve these flags.

enforcementInfoList

Specifies association’s enforcement value. Association with enforcement value as ENFORCE_YES (AR_ASSOCIATION_ENFORCE_YES) signifies that this association is enforced and the association with enforcement value as ENFORCE_NO (AR_ASSOCIATION_ENFORCE_NO) signifies that this association is not enforced. For more information, see Enforced and unenforced relationships.

cardinalityInfoList

This cardinality list provides information about cardinality of each association. Specify NULL if you do not want to retrieve the list.

  • 0 – Retrieve all associations of any cardinality.
  • 1 – Retrieve all association of cardinality type OneToOne.
    (AR_ASSOCIATION_CARDINALITY_ONE_TO_ONE)
  • 2 – Retrieve all association of cardinality type OneToMany.
    (AR_ASSOCIATION_CARDINALITY_ONE_TO_MANY)
  • 3 – Retrieve all association of cardinality type ManyToMany.
    (AR_ASSOCIATION_CARDINALITY_MANY_TO_MANY)

ManyTOMany cardinality is not applicable for direct type of associations.

descriptionList

The description list with the association. This text can be of any length. Specify NULL for this parameter if you do not want to retrieve the list.

helpTextList

A list of the help texts with the association. Specify NULL for this parameter if you do not want to retrieve the help texts (which is useful if you are calling this function to verify whether instances of these objects exist).

timeStampList

A list of time stamps that specify the last change to the filters. Specify NULL for this parameter if you do not want to retrieve this value.

ownerList

A list of association owners. Specify NULL for this parameter if you do not want to retrieve the owners.

lastchangedList

A list of users who made the last changes to the associations. Specify NULL for this parameter if you do not want to retrieve this list.

changeDiaryList

A list of the change diaries associated with the associations. The diary field text can be of any length. The server adds the user making the change and a time stamp when it saves the change diary. Specify NULL for this parameter if you do not want to retrieve the diary list. This value can be large, so do not retrieve it if the program does not need it, for example, if the program is only checking it an object exists.

objPropList

List of server-managed object properties to search for. Returns all associations that match the object properties. If this parameter is set to NULL, no properties are returned. See Server object properties and structures.

Return values

existList

A list of flags and corresponding Boolean values that indicate whether the associations exist and meet the qualifying criteria. Values: TRUE means the association exists; FALSE means the association does not exist.

assocNameList

A list of names of associations that this function returns. This argument returns names in the same order as the input list of associations to be retrieved. If namelist is not NULL, each return list maintains a corresponding position for each supplied name. As a consequence, you must see the existList returned to see if the association in that position had any data returned for it.

status

A list of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error checking.

See also

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

Comments