Update Values Method

Updates List of values in a Value List.

Return Type

A psRETURN_VALUES value.

Syntax

object.UpdateValues(sName, vaValues)

object is an expression evaluating to an object of type psPortfoliosvalueList.

Arguments

Argument

Data Type

Description

sName

String

The Value List to update is identified by this.

vaValues

Variant

List of objects of type psPortfoliosValueListValueInfo.

Each object in the list represents a value in the Value List. Some values will get updated (possibly renamed or assigned a new weight), while others will be added. Values that exist in the value list but not specifed in vaValues will be deleted.

The relevant fields in each psPortfoliosValueListValueInfo object are:

  • ID
    An integer used as the internal representation of the value in the PPM database (different than the number shown in the Value List wizard).
    If specified, the value to update will be identified by this. If no Value with this ID exists in the value list, such a value will be added.
    To rename a value, specify the ID.
  • Text
    Unless ID is specified, this string identifies the value to update. If no Value with this Text exists in the value list, such a value will be added.
    If ID is specified, this sets the Text that is displayed for the Value.
  • Weight
    This is the Weight as in the Value List wizard. If it is not specified, weights will be automatically assigned to the values using consecutive numbers in the order that the values appear in the list. Use this element to send a zero (0) value

Note: The data type of the Weight element is Float.

  • WeightDouble
    This is the Weight as in the Value List wizard. Use this element instead of the Weight element to specify a non-zero value with a precision of up to 10 digits.
    When an API request contains both “Weight” and “WeightDouble” elements, the value of the WeightDouble element supersedes and is saved in the database.

    Note: The data type of the WeightDouble element is Double.

Return Value

For the Return Error Code refer to Error Handling for APIs of type A.

Code Examples in Different Programming Languages

Set the 'Domains' value list to show only Items(1; 1.7), Portfolios, Gizmos(3;) and Wizards (; 3.14). Gizmos(3) will replace Applications(3).

See Example 2 of psPortfoliosValueList.UpdateValues



Legal Notices | Your Privacy Rights
Copyright © 1998, 2024

Last Published Friday, April 19, 2024