Retrieving specific context attributes
In this example, selling locations are retrieved.
Dim oSell As Object = ObjProperty("ATTRIBVAL.CONTEXT", "", "", "SELLOC", 1)
If TypeOf oSell is String then
MessageList("Selling Location is ", oSell)
For z As Integer = 0 To oSell.length - 1
MessageList("Selling Location is ", oSell(z))
Next z
The script returns this information:
01. Selling Location is CANADA
02. Selling Location is EU
03. Selling Location is THAILAND
04. Selling Location is UK
05. Selling Location is US
This example demonstrates how to retrieve the various types of context attributes. It also shows how to force the returned values to always be in an array.
Dim RawValue As Object = ObjProperty("ATTRIBVAL.CONTEXT", "", "", "C_BRAND", "ATTRIBCODE")
If IsArray(RawValue) Then
ContextValues = RawValue
Else
ReDim ContextValues(0)
ContextValues(0) = RawValue
End If
Replace the fourth argument ("C_BRAND"
in the example)
with this information:
-
"SELLOC"
-- selling location -
"MFGLOC"
-- manufacturing location -
"C_BRAND"
-- brand -
"C_PRODTYPE"
-- product type -
"C_ENDUSE"
-- end use -
"C_ENDUSER"
-- end user