Salesforce

VariantCreate (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

VariantCreate (Magic xpa 3.x)

Creates a variant according to the provided data.

Syntax:

VariantCreate(VT type, value, optional time value)

Parameters:

VT type – A numeric value representing the variant type. See Variant Storage Types.

value – The value selected for the variant. This can be any data type, a date, string, number, or BLOB.

optional time value – Allows you to move a time into a VT_Date type. Relevant when the Magic xpa attribute parameter is set to D. The Date data type of a variant stores both date and time values. Set the date in the value parameter and the time in the optional time value parameter.

Returns:

A BLOB value representing the created variant. You can use the returned value to update a BLOB field, keep the variant value, or pass the BLOB value directly to an external object.

Examples:

VariantCreate (8,'Hello') returns a variant set by the string value as a VT_BSTR data type.

VariantCreate (7,Date(),Time()) returns a variant set with the Date and Time values as VT_DATE data type.

Exceptions:

This function is not supported for Rich Client tasks.

See also:

The Online Samples project (program CS05 and CS06)

Reference
Attachment 
Attachment