Error: Invalid spaceKey on retrieving a related space config.

ARGetAssociation

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 the specified association from the specified server.

Privileges

BMC Remedy AR System administrator.

Synopsis

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

int ARGetAssociation(
      ARControlStruct                     *control,
      ARNameType                          name,
      ARNameType                          primaryFormName,
      ARNameType                          secondaryFormName,
      ARQualifierStruct                   *primaryFormQual,
      ARQualifierStruct                   *secondaryFormQual,
      ARAssociationMappingInfoStruct      *keyMapping,
      ARBoolean                           *enable,
      unsigned int                        *enforcement,
      unsigned int                        *cardinality,
      char                                **description,
      char                                **helpText,
      ARTimestamp                         *timestamp,
      ARAccessNameType                    owner,
      ARAccessNameType                    lastChanged,
      char                                **changeDiary,
      ARPropList                          *objPropList,
      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 ARSetSessionConfiguration). 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.

name

The name of the association to retrieve.

primaryFormName

The name of the form to be used as the primary form in an association. A form object with this form name should exist in the server or else the server does not allow the retrieval of the association.

secondaryFormName

The name of the form to be used as secondary form in association. Form object with this form name should exist in server otherwise; server will not allow retrieval of association.

primaryFormQual

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

secondaryFormQual

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

AssociationType

The type of association you want to update. (AR_ASSOCIATION_TYPE_INDIRECT or AR_ASSOCIATION_TYPE_DIRECT).

keyMapping 

  • For Direct Association, this structure contains pkFkMappingInfoList, which represents field mapping used between the primary form and the secondary form.
  • For Indirect Association, this structure contains associationFormMapping, to specify associationFormName and associationFormQual along with field mapping between the primary and the association form and the secondary and the association form.

enable

A flag to enable or disable this association. A value of 0 disables the association and a value of 1 enables the association.

enforcement

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.

cardinality

It can have one of the following values:

  • OneToOne (AR_ASSOCIATION_CARDINALITY_ONE_TO_ONE)
  • OneToMany (AR_ASSOCIATION_CARDINALITY_ONE_TO_MANY)
  • ManyToMany (AR_ASSOCIATION_CARDINALITY_MANY_TO_MANY)

ManyTOMany cardinality is not applicable for direct type of associations.

description

The description associated with the association. This text can be of any length. If the value is NULL, there is no associate description attached with this object.

helpText

The help text associated with the association. This text can be of any length. If the value is NULL, there is no associate help text attached with this object.

timestamp

A time stamp that specifies the last change to the value. If the value is NULL, the time stamp is not retrieved.

owner

The owner for the association. The owner defaults to the user performing the operation if the value is NULL for this parameter.

lastchanged

The user who made the last change to the association. If the value is NULL, the last change user is not retrieved.

changeDiary

The initial change diary associated with the association. This text can be of any length. The server adds the user making the change and a time stamp when it saves the change diary. If the value is NULL for this parameter, there is no change diary text associated with this object.

objPropList

List of server-managed object properties to search for. Returns all associations that match the object properties. If the value is NULL, no properties list is returned. See Server object properties.

Return values

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

ARSetAssociation, ARCreateAssociation, ARGetMultipleAssociations, ARGetListAssociation, ARDeleteAssociation

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

Comments