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

In the CaliberRM SDK is there any Visual Basic sample code to change a UDA Boolean attribute?

In the CaliberRM SDK is there any Visual Basic sample code to change a UDA Boolean attribute?

Problem:

In the CaliberRM SDK is there any Visual Basic sample code to change a UDA Boolean attribute?

Resolution:

  1. Product Name: CaliberRM
  2. Product Version: CaliberRM 2005 R2 SP1
  3. Product Component: SDK
  4. Platform/OS Version: Windows

Question:

In the CaliberRM SDK is there any Visual Basic sample code to change a UDA Boolean attribute?

Answer:

Yes, the code is shown below. The code performs the following:

  1. Loop through attribute
  2. Check what Data Type the object is.
  3. Cast the object as a UDA Boolean

Please ensure you have the following:

  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


"________________________________________________________

"Find all Boolean UDA Attributes and change them to true
"________________________________________________________
Dim my_uda_boolean_value As UDABooleanValue
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 = "Boolean" Then
Debug.Print my_attributes.Attribute.Name
"Cast attribute as UDABoolean
Set my_uda_boolean_value = my_attributes
"to change a UDA Boolean value
my_requirement.lock
my_uda_boolean_value.Value = True
my_requirement.Save ("SDK UDABoolean Change")
my_requirement.unlock
End If
Next
"________________________________________________________


Author: David Carson

Old KB# 15869

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.