### VB.NET: Get Octal Method Example
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Octal-Method-ae1284372.html
This VB.NET code example demonstrates how to use the Get Octal method to convert integers from 1 to 15 into their octal string representations and display them.
```vb
Sub Button_Click
Dim x As Integer, y As Integer
Dim msgtext As String
Dim nofspaces As Integer
msgtext = "Octal numbers from 1 to 15:" & Chr(10)
For x = 1 to 15
nofspaces = 10
y = Oct(x)
If Len(x) = 2 then
nofspaces = nofspaces - 2
End If
msgtext = msgtext & Chr(10) & x & Space(nofspaces) & y
Next x
End Sub
```
--------------------------------
### Instance Source Path Examples
Source: https://docs.oracle.com/cd/G46981_01/books/OrderMgtInfra/c-Using-the-Instance-Source-Type-for-the-Customizable-Product-Instance-Property-Sets-za1028066.html
Practical examples of path definitions for retrieving Price List IDs and Line Item Quantities from the current business component context.
```text
$Current/Header/Price List Id
$Current/Line Item/Quantity
```
--------------------------------
### VB.NET Example: Calculate Building Height using Get Sine
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Sine-Method-ae1284451.html
This VB.NET code example demonstrates how to use the Get Sine method to calculate the height of a building. It converts degrees to radians and uses the sine function along with the roof length.
```vb.net
Sub Button_Click
Dim height, rooflength, pitch, msgtext As String
Const PI = 3.14159
Const conversion = PI/180
pitch = 35
pitch = pitch * conversion
rooflength = 75
height = Sin(pitch) * rooflength
msgtext = "The height of the building is "
msgtext = msgtext & Format(height, "##.##") & " feet."
End Sub
```
--------------------------------
### Example OIAParamMapping Configuration
Source: https://docs.oracle.com/cd/G46981_01/books/SelfServAdm/c-Integration-Mapping-Parameters.html
Shows a comprehensive example of the OIAParamMapping configuration, detailing the mapping between various integration parameters and their corresponding Intelligent Advisor parameter names used in different workflows.
```Siebel
Id|Id;ApplicationRowID|ApplicationRowID;ApplNumber|ApplNumber;IOName|IOName;IOXmlTag|IOXmlTag;PrimaryIC|PrimaryIC;PrimaryICXmlTag|PrimaryICXmlTag;LoadSearchSpec|LoadSearchSpec;App Context Type|AppContextType;App Status Value|AppStatusValue;App BC Name|AppBC;App BO Name|AppBO;App Status Field|AppStatusField
```
--------------------------------
### Get Instance Method
Source: https://docs.oracle.com/cd/G46981_01/books/OrderMgtInfra/c-Get-Instance-Method-zh1116218.html
Retrieves a complex product instance from the Product Configurator using the provided Object Id.
```APIDOC
## GET /instance
### Description
This method is one of the Product Manipulation Toolkit Business Service Methods. It gets a complex product instance from the Product Configurator.
### Method
GET
### Endpoint
/instance
### Parameters
#### Query Parameters
- **Object Id** (string) - Required - Key used to return the preloaded complex asset. The argument Instance Id returned by the Reconfigure Product Instance method is passed here.
- **Instance Id** (string) - Optional - Passed to this method as output from Reconfigure Product Instance, this key is used to return a complex asset that was loaded into the Product Configurator when Reconfigure Product Instance was invoked.
### Request Example
```json
{
"Object Id": "some_object_id",
"Instance Id": "some_instance_id"
}
```
### Response
#### Success Response (200)
- **SiebelMessage** (string) - Complex product instance returned by the Configurator runtime session.
#### Response Example
```json
{
"SiebelMessage": "..."
}
```
```
--------------------------------
### Example: Get ANSI Integer Value of a Character (VB.NET)
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-ANSI-Integer-Method-ae1179630.html
This example demonstrates how to use the Asc function in VB.NET. It assigns a character to a string variable and then uses Asc to get its corresponding ANSI integer value, storing it in an integer variable.
```vb.net
Sub Button_Click
Dim userchar As String
Dim ascVal as Integer
userchar = "Z"
ascVal = Asc(userchar)
End Sub
```
--------------------------------
### Example Visutl Execution
Source: https://docs.oracle.com/cd/G46981_01/books/RRAdm/c-Using-the-Visutl-Utility-to-Determine-Visibility-for-a-User-aag1015916.html
A practical example of running the Visutl utility with specific parameters for a user named JSMITH on the APPSVR01 server.
```shell
visutl /u sadmin /p sadmin /a APPSVR01 /n JSMITH /v H
```
--------------------------------
### VB Get File Names Method Syntax and Example
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-File-Names-Method-ae1274373.html
Demonstrates the syntax and a practical application of the Visual Basic 'Get File Names' method. This method is used to retrieve file names from a specified directory with optional attribute filtering. The example shows how to list all files on drive A:.
```Visual Basic
Sub Button_Click
Dim msgReturn
Dim directory, count
Dim x, msgtext
Dim A()
count = 1
ReDim A(100)
directory = Dir ("A:\*.*")
Do While directory <> ""
A(count) = directory
Count = count + 1
directory = Dir
loop
msgtext = "Contents of drive A:\ is:" & Chr(10) & Chr(10)
For x = 1 to count
msgtext = msgtext & A(x) & Chr(10)
Next x
End Sub
```
--------------------------------
### Example Business Service Context
Source: https://docs.oracle.com/cd/G46981_01/books/PersAdm/c-Creating-a-New-Rule-zu120631.html
This example demonstrates how to format the 'Business Service Context' parameter when invoking a business service. It shows a key-value pair structure for passing user-specific information.
```text
UserType=Partner;AccountState=Gold
```
--------------------------------
### VB Example: Finding Substring Position
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Substring-Position-Method-ae1283661.html
This VB code example demonstrates the usage of the Get Substring Position method. It generates a random string, then searches for the position of the character 'i' within it, displaying the result or a 'not found' message.
```vb
Sub Button_Click
Dim x as Integer
Dim y
Dim str1 as String
Dim str2 as String
Dim letter as String
Dim randomvalue
Dim upper, lower
Dim position as Integer
Dim msgtext, newline
upper = Asc("z")
lower = Asc("a")
newline = Chr(10)
Randomize
For x = 1 to 26
randomvalue = Int(((upper - (lower + 1)) * Rnd) + lower)
letter = Chr(randomvalue)
str1 = str1 & letter
'Need to waste time here for fast processors
For y = 1 to 1000
Next y
Next x
str2 = "i"
position = InStr(str1,str2)
If position then
msgtext = "The position of " & str2 & " is: " _
& position & newline & "in string: " & str1
Else
msgtext = "The letter: " & str2 & " was not found in: " _
& newline
msgtext = msgtext & str1
End If
End Sub
```
--------------------------------
### Displaying Images with HTML
Tag (Windows Path Syntax)
Source: https://docs.oracle.com/cd/G46981_01/books/ProdAdm/c-Images-abk1005156.html
Demonstrates how to use the HTML
tag to display images. It explains how to specify the image path, including shortening it by storing images in the same directory as other Web Engine images. It also shows how to add HEIGHT and WIDTH attributes for sizing.
```html
```
```html
img src="IMAGES\red.gif">
```
--------------------------------
### VB.NET Get Substring Method Format
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Substring-Method-ae1263654.html
This snippet shows the basic format for the Get Substring method in VB.NET. It outlines the required arguments: the source string, the starting position, and the optional length of the substring to extract.
```vb.net
Mid[$](_string_, _start_[, _length_])
```
--------------------------------
### POST /CfgUIService/LoadInstance
Source: https://docs.oracle.com/cd/G46981_01/books/ProdAdm/c-Load-Instance-Method-abz1057039.html
The LoadInstance method initializes the Customize UI by invoking the Complex Object Instance Service, validating the product model, and setting up the rule engine evaluator.
```APIDOC
## POST /CfgUIService/LoadInstance
### Description
Invokes the Cfg UI Service to display the Customize UI. It initializes the instance service with a CxObj, validates it against product definitions, and performs eligibility and compatibility checks.
### Method
POST
### Endpoint
/CfgUIService/LoadInstance
### Parameters
#### Request Body (Input Arguments)
- **AutoSync** (string) - Optional - Sync changes to the DB made during LoadInstance.
- **BusObjName** (string) - Required - Business Object name.
- **Cfg Type** (string) - Required - Set to 'eConfigurator'.
- **ComplexProdutId** (string) - Required - Root Product Id.
- **Mode** (string) - Required - Context mode: Quote, Order, Agreement, or Asset.
- **ParentObjId** (string) - Required - ID of the parent Quote, Order, Agreement, or Asset.
- **RowId** (string) - Required - Root Line Item Id.
- **ValidateMode** (string) - Optional - If set to 'Y', performs validation without synchronization.
### Request Example
{
"BusObjName": "Order Entry",
"Cfg Type": "eConfigurator",
"ComplexProdutId": "1-ABCDE",
"Mode": "Order",
"ParentObjId": "1-12345",
"RowId": "1-99999"
}
### Response
#### Success Response (200)
- **CxObj** (object) - The property set corresponding to the CxObj data structure in the Instance service.
#### Response Example
{
"CxObj": {
"Status": "Initialized",
"InstanceData": "..."
}
}
```
--------------------------------
### VB.NET Get Cosine Method Example
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Cosine-Method-ae1188091.html
This VB.NET code snippet demonstrates how to use the Get Cosine method to calculate the length of a roof based on its pitch and width. It includes constants for PI and degree-to-radian conversion.
```vb.net
Sub Button_Click
Dim bwidth As Single, roof As Single, pitch As Single
Dim msgtext
Const PI = 3.14159
Const conversion = PI/180
pitch = 35
pitch = Cos(pitch * conversion)
bwidth = 75
roof = bwidth/pitch
msgtext = "The length of the roof is " & _
Format(roof, "##.##") & " feet."
End Sub
```
--------------------------------
### VB.NET: Example of Get Repeated Character String for Formatting
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Repeated-Character-String-Method-ae1271752.html
This VB.NET code example demonstrates how to use the Get Repeated Character String method to format a payment amount. It pads the amount with asterisks to ensure it occupies a specific width, handling cases with and without decimal points. The example includes logic for string length validation and uses `Asc` to convert the asterisk character to its ANSI code.
```vb.net
Sub Button_Click
Dim str1 as String
Dim size as Integer
i: str1 = 666655.23
If Instr(str1,".") = 0 then
str1 = str1 + ".00"
End If
If Len(str1)>10 then
Goto i
End If
size = 10-Len(str1)
'Print amount in a space on a check allotted for 10 characters
str1 = String(size,Asc("*")) & str1
End Sub
```
--------------------------------
### HTML Text Formatting Commands for Item Names
Source: https://docs.oracle.com/cd/G46981_01/books/ProdAdm/c-HTML-Text-Formatting-Commands-abk1021679.html
Demonstrates how to use HTML tags to format item names, such as displaying 'Lamp' in bold. It also explains using tables for lengthy messages and provides examples of allowed HTML tag categories.
```HTML
Lamp
```
```HTML
Link Text
```
--------------------------------
### POST /SetInstance
Source: https://docs.oracle.com/cd/G46981_01/books/ProdAdm/c-Set-Instance-Method-aby1005422.html
Creates a configuration session with a supplied property set, requiring a specific wrapper structure.
```APIDOC
## POST /SetInstance
### Description
Creates a configuration session with the supplied property set, permitting configuration without directly writing to the database. The input property set must be wrapped inside a parent property set.
### Method
POST
### Endpoint
/SetInstance
### Parameters
#### Request Body
- **PropertySet** (Object) - Required - The parent property set containing the instance property set as a child.
- **PrimaryRowId** (String) - Required - The unique identifier for the primary row.
- **OutputIntObjectName** (String) - Required - The name of the integration object.
### Request Example
{
"PropertySet": {
"PrimaryRowId": "42-56O78",
"OutputIntObjectName": "7.7 Quote Integration Object"
}
}
### Response
#### Success Response (200)
- **Status** (String) - Indicates successful session creation.
#### Response Example
{
"status": "success",
"message": "Configuration session created"
}
```
--------------------------------
### Accessing a COM Object from a File (Visual Basic)
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-COM-Object-Method-ae1270263.html
Example of using the Get COM Object method to access a COM object stored in a file. It shows how to dimension a variable as an object and assign the file object to it. The example assumes the file is located in 'My Documents'.
```vb
Dim oFileObject As Object
Set oFileObject = GetObject("C:\My Documents\payables.xls")
```
--------------------------------
### Perform Batch Configuration Requests in Oracle
Source: https://docs.oracle.com/cd/G46981_01/books/ProdAdm/c-Batch-Request-Method-abm1023525.html
This script demonstrates how to use the Cfg_InstInitialize function to add multiple product components and configure their attributes in a single batch operation. It utilizes PropertySets to define request types, item aliases, and hierarchical paths for products like shirts, hats, and bags.
```JavaScript
function Cfg_InstInitialize (RootProduct)
{
var parentPropset = TheApplication().NewPropertySet();
var outPropset = TheApplication().NewPropertySet();
var childPropset1 = TheApplication().NewPropertySet();
var childPropset2 = TheApplication().NewPropertySet();
var childPropset3 = TheApplication().NewPropertySet();
var childPropset4 = TheApplication().NewPropertySet();
var childPropset5 = TheApplication().NewPropertySet();
var childPropset6 = TheApplication().NewPropertySet();
var childPropset7 = TheApplication().NewPropertySet();
//Add 10 short sleeve shirts
childPropset1.SetProperty("RequestType", "AddItem");
childPropset1.SetProperty("OutItemAlias","RedShirtAlias");
childPropset1.SetProperty("Parent Path","$.[T-Shirt]#1");
childPropset1.SetProperty("PortName","Team T-Shirt");
childPropset1.SetProperty("Name","Short sleeve shirt");
childPropset1.SetProperty("Quantity","10");
parentPropset.AddChild(childPropset1);
//set Red color
childPropset2.SetProperty("RequestType","SetAttribute");
childPropset2.SetProperty("ItemAlias","RedShirtAlias");
childPropset2.SetProperty("Name","Color");
childPropset2.SetProperty("Value","Red");
parentPropset.AddChild(childPropset2);
//Add 10 Matching Hats
childPropset3.SetProperty("RequestType", "AddItem");
childPropset3.SetProperty("ItemAlias","RedShirtAlias");
childPropset3.SetProperty("PortName","Accessories");
childPropset3.SetProperty("Name","Matching Hat");
childPropset3.SetProperty("Quantity","10");
parentPropset.AddChild(childPropset3);
//Add 15 short sleeve shirts
childPropset4.SetProperty("RequestType", "AddItem");
childPropset4.SetProperty("OutItemAlias","BlueShirtAlias");
childPropset4.SetProperty("Parent Path","$.[T-Shirt]#1");
childPropset4.SetProperty("PortName","Team T-Shirt");
childPropset4.SetProperty("Name","Short sleeve shirt");
childPropset4.SetProperty("Quantity","15");
parentPropset.AddChild(childPropset4);
//set Blue color
childPropset5.SetProperty("RequestType","SetAttribute");
childPropset5.SetProperty("ItemAlias","BlueShirtAlias");
childPropset5.SetProperty("Name","Color");
childPropset5.SetProperty("Value","Blue");
parentPropset.AddChild(childPropset5);
//Add 1 Matching Bag
childPropset6.SetProperty("RequestType", "AddItem");
childPropset6.SetProperty("ItemAlias","BlueShirtAlias");
childPropset6.SetProperty("OutItemAlias","BlueDuffelBag");
childPropset6.SetProperty("PortName","Accessories");
childPropset6.SetProperty("Name","Matching Bag");
childPropset6.SetProperty("Quantity","1");
parentPropset.AddChild(childPropset6);
//Set Bag Type = Duffel
childPropset7.SetProperty("RequestType","SetAttribute");
childPropset7.SetProperty("ItemAlias","BlueDuffelBag");
childPropset7.SetProperty("Name","Type");
childPropset7.SetProperty("Value","Duffel");
parentPropset.AddChild(childPropset7);
BatchRequest(parentPropset, outPropset) ;
}
```
--------------------------------
### Calculate Roof Angle using Get Arctangent Method (VB)
Source: https://docs.oracle.com/cd/G46981_01/books/VBLANG/c-Get-Arctangent-Method-ae1004285.html
Example demonstrating the use of the Get Arctangent method in VB to calculate a roof angle in degrees. It involves defining variables for height, span, and PI, calculating the angle in radians, and converting it to degrees.
```vb
Sub Button_Click
Dim height As Single, span As Single, angle As Single
Dim PI As Single
PI = 3.14159
height = 8
span = 16
angle = Atn(height/span) * (180/PI)
End Sub
```