Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Visual Basic Sample Code to Access & Change a UDA Integer Attribute

Visual Basic Sample Code to Access & Change a UDA Integer Attribute

Problem:

Visual Basic Sample Code to Access & Change a UDA Integer Attribute

Resolution:


  • Product Name: CaliberRM
  • Product Version: CaliberRM 2005 R2 SP1
  • Product Component: SDK
  • Platform/OS Version: Microsoft Platforms including XP / Windows 2000 / Windows Server 2003 / Windows Server 2005

Pre Requites

  1. CaliberRM SDK installed
  2. Microsoft Word / Office installed
  3. Basic understanding of Object Orientated Programming and Visual Basic for Applications (VBA)
  4. KB Article 5624: CaliberRM: Visual Basic for Applications (VBA) , setting up a Microsoft Word VBA application. http://support.borland.com/entry.jspa?categoryID=435&externalID=5623

Sample Code to Access & Change a UDA Integer Attribute

Note: The UDA Long Integer object is a spin control

________________________________________________________

Find all Long Integer UDA Attributes and change them to 2

________________________________________________________

Dim my_uda_date_value As UDAIntegerValue

no_of_attributes = my_requirement.AttributeValues.Count

For i = 0 To no_of_attributes - 1

loop through list of attributes

Set my_attributes = my_requirement.AttributeValues.Item(i)

check type of attribute

If my_attributes.Attribute.UITypeName = "Long Integer" Then

Debug.Print my_attributes.Attribute.Name

Cast attribute as UDAIntegerValue

Set my_uda_integer_value = my_attributes

to change a UDA�Integer value

my_requirement.lock

my_uda_integer_value.Value = 2

my_requirement.Save ("SDK UDA Long Integer Change")

my_requirement.unlock

End If

Next


Old KB# 15871

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 18:26
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.