Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

  •      
  • Navigation: Developer's Guide > QPR API > The Object Model > Common > Actions

    SetProperty

    Scroll Prev Top Next More

    Revision history:

    Introduced in QPR 7.5.1

    Last changed in QPR 2012

     

    Set value to an action's property.

     

    Synopsis:

     

    Actions.SetProperty(ActionId, PropertyName, Value)

     

    Parameters:

     

    ActionId: Integer. ID of the action for which the property value is set.

    PropertyName: String. Name of the property for which a value is set. One of the following properties (note that the actual selection of available properties depends on the type of the action):

    Header | Name: String.

    Description: String.

    PublishType | PublishTypeName: Integer | String. Defines the users for who the action is published. 0 = action's creator, 1 = parent element users, 2 = selected users, 3 = all.

    PublishForUsers: Integer | String. Either an integer array or a comma-separated list of user IDs for who the action is published. This is valid only if PublishType is 2.

    Category: String.

    CreatedDate: DateTime | String.

    Creator.Id: Integer. Sets the creator by user ID.

    Creator.LoginName: String. Sets the creator by login name.

    Owner: Integer | Array of integer.

    AssignedTo: Integer | Array of integer.

    ApprovedBy: Integer | Array of integer.

    StartDate: DateTime.

    Deadline: DateTime.

    Status: String.

    Progress: Integer | Float.

    Version: String.

    EmbeddedData: String.

    LinkedLocation: String.

    ValidFrom: DateTime.

    ValidTo: DateTime.

    Severity: String.

    IdentifiedBy: Integer | Array of integer.

    Identified: DateTime.

    Probability: String.

    ImpactMinimization: String.

    Mitigation: String.

    Impact: String.

    Rating: String.

    Notes: String.

    NameOfTheEmbeddedFile: String. Note that this property is empty for default action types as attachments are in fact child actions for the action they are attached to. In order to query attachments, use ActionTypes=EMBEDDEDATTACHMENT in the Actions.Find call.

    MIMETypeOfTheEmbeddedFile: String. Note that this property is empty for default action types as attachments are in fact child actions for the action they are attached to. In order to query attachments, use ActionTypes=EMBEDDEDATTACHMENT in the Actions.Find call.

     

     NOTE: The listing above assumes that the default actiontypes.ini is used. With customized actiontypes.ini files some default properties can be missing or additional ones available.

     

    Value: Variant. Value for the property defined by PropertyName.

     

    Required Rights:

     

    Modify rights to action defined by ActionId.

     

    Return Values:

    Below are listed the return values that this function can return:

     

    RV_SUCCESS

    RV_UNKNOWN_ERROR

    RV_ASSOCIATION_NOT_FOUND

    RV_UNSUPPORTED_OPERATION

    RV_ACCESS_DENIED

    RV_APPLICATION_QUIT_CALLED

    RV_NOT_CONNECTED_TO_SERVER

    RV_NOT_AUTHENTICATED

     

    Example Procedure:

     

    iRet = SCApplication.Actions.SetProperty(iId, "Header", "Modified by a script")