GetValueOf<Datatype> method (WinStudio scripts)

Applies To

  • IWSFormComponent interface
  • IWSIDOProperty interface
  • IWSVariable interface
  • IGlobalScriptParm interface

Definition

Returns the value of an object as a given non-reference data type.

Syntax

object.GetValueOf<Datatype>( ifNullValue )

  Part   Description
object Required. A reference to a valid component, property, variable, or script.
Datatype Required. The data type which the value must be when returned. For information about the valid data types, see the "Remarks" section.
ifNullValue Required. The value to be returned if the object's value is null. Must match the data type.

Remarks

There is a separate method signature for each data type. So, when deciding which version of this method to use, replace <Datatype> in the method name with the name of the appropriate data type. For example, to return the value of a string object, you would use GetValueOfString; to return the value of a long integer, you would use GetValueOfLong; and so forth.

These are the valid data types for this method:

Boolean Double Integer String
Byte Guid Long UInt16
Char Int16 SByte UInt32
DateTime Int32 Short UInt64
Decimal Int64 Single  

Example

Dim MyIntValue As Integer = _
   ThisForm.PrimaryIDOCollection(0)("MyProp").GetValueOfInteger(0)
Dim MyStrValue As String = _
   ThisForm.PrimaryIDOCollection(0)("MyProp").GetValueOfString("No value")