Custom Products

Custom Products utilises the extensive flexibility of Pascal Scripting to enable you to establish a simple Question and Answer routine to generate a full product configuration with quantities and costs to support Quoting, Sales, and Job Ordering.  The finished ‘Custom Product’ can be converted to an Assembly Order for manufacture.

 

List Tab

 

Display fields

 

The displayed fields are taken from the Custom Products information entered into the ‘Detail’ tab.  

 

Data Display Options

 

Field Position - On the List screen you can move the field position by dragging the column heading left or right to the position where you want it to appear.

 

Filtering and Sorting - If you ‘check’ the checkbox then the displayed data is available for filtering and sorting:

To sort the data in a selected column simply click on the column heading.  Clicking against will sort in descending order.

Click on the black ‘down arrow’ to the right of your selected column heading and you can either select a specific entry to display all records containing that entry, or you can select (Custom…) to enter detailed selection criteria.

 

Searching - If you enter some text into the ‘Search’ field and click on the ‘binoculars’ Icon then all records will be interrogated and those records that contain the entered text will be displayed.   To revert back to displaying all records click on the ‘Eraser’ Icon

 

Buttons

 

Close: This will close the Custom Products screen.  If you have any unsaved data then you will be asked if you wish to save it before the screen is closed.

 

Add: This will bring up a panel for entry of the following information that is required when creating a new Custom Product

Create Custom Product From Scratch: If this radio button is ‘checked’ then the next field must be completed

Item:  From the drop-down list select the Item against which the Custom Product Script will be created.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

Copy Custom Product Design from another Item: If this radio button is ‘checked’ then the next two fields must be completed

Select an Item with an existing Custom Design: From the drop-down list select an Item.   Its Custom Product Script will then be copied to the new Product where it can be amended if required

Copy Custom Design To:  From the drop-down list select the Item against which the Custom Product Script will be copied.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

 

Buttons

Create: Click the ‘create’ button to take you to the ‘Details’ tab for entering further information.

Cancel: Click the ‘cancel’ button to exit this panel

 

Save: Not applicable to the List panel

 

Cancel: Not applicable to the List panel

 

Delete: This removes the current Custom Product Script from this table

 

Related: This will bring up a list of functions that are related to Custom Products.  You may open and maintain information in those screens whilst still remaining in the Custom Products screen.

 

Reports: This will bring up a list of Reports that are related to the Custom Products. You can immediately run the report whilst still remaining in the Custom Products screen.

 

 

Detail Tab

 

The Detail Tab allows you to enter reference details relating to this Custom Script.

 

Entry and Display fields

 

Item Code: Display only field showing the Custom Product's Item identity

 

Description: Display only field showing the description of the Item

 

Unit: Display only field showing the base unit for the Item

 

Revision Notes: Enter notes related to this Custom Product.

 

Buttons

 

Close: This will close the Custom Products screen.  If you have any unsaved data then you will be asked if you wish to save it before the screen is closed.

 

Add: This will bring up a panel for entry of the following information that is required when creating a new Custom Product

Create Custom Product From Scratch: If this radio button is ‘checked’ then the next field must be completed

Item:  From the drop-down list select the Item against which the Custom Product Script will be created.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

Copy Custom Product Design from another Item: If this radio button is ‘checked’ then the next two fields must be completed

Select an Item with an existing Custom Design: From the drop-down list select an Item.   Its Custom Product Script will then be copied to the new Product where it can be amended if required

Copy Custom Design To:  From the drop-down list select the Item against which the Custom Product Script will be copied.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

 

Buttons

Create: Click the ‘create’ button to take you to the ‘Details’ tab for entering further information.

Cancel: Click the ‘cancel’ button to exit this panel

 

Save: Not applicable to the Detail panel

 

Cancel: Not applicable to the Detail panel

 

Delete: This removes the current Custom Product Script from this table

 

Related: This will bring up a list of functions that are related to Custom Products.  You may open and maintain information in those screens whilst still remaining in the Custom Products screen.

 

Reports: This will bring up a list of Reports that are related to the Custom Products. You can immediately run the report whilst still remaining in the Custom Products screen.

 

 

Script Tab

 

The Script Tab allows you to enter reference details relating to this Custom Script.

 

A ‘normal’ Custom Product Script has 3 segments

 

Declare Variables

Ask the Questions

Generate the Custom Product

 

The more experienced programmer can intermingle the segments to produce a more streamlined solution.

 

In addition to the standard Pascal Scripting functions some functions have been specifically created for Ostendo’s Custom Product Configurator; these are shown below

 

Declare Variables

 

You should declare all variables being used in this script.  The standard format is used.  For example

Var

TimberType: String;

DeskLength: Double;

DeskDepth: Integer;

 

Ask the Questions

 

Four basic functions have been created for you to ask questions.  Whenever you run the Custom Product generator these questions are presented to the screen for entry of answers to determine the finished product.

 

Variable := AskMandatoryQuestion(‘Question’,’TYPE’, ‘Explanation’, ‘[d]List1, List2, List3’, Current);

 

This type of question must be answered. 

 

The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Question: Define the question (max 200chars) enclosed on ‘commas’

TYPE: This is INTEGER, TEXT, DOUBLE, DATE, BOOLEAN, or TEXT LIST

Explanation: A longer explanation that can be referenced during configuration

[d]: Optional entry to define a default display entry from the List

List: Allowable options - separated by a comma

Current: Optional Entry to prefill question with current answer if re-doing questions

 

Example: TimberType := AskMandatoryQuestion('Please select the type of Timber ','TEXT','Rimu provides a better finish','[d]Pine,Rimu',TimberType);

 

 

Variable := AskMandatoryQuestionWithLookup(‘Question’,‘Explanation’,LookupIndex,Current);

 

This type of question must be answered. 

 

The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Question: Define the question (max 200chars) enclosed on ‘commas’

Explanation: A longer explanation that can be referenced during configuration

LookupIndex: The Index Reference of the Ostendo Table

Current: Optional Entry to prefill question with current answer if re-doing questions

 

Example: ItemNo := AskMandatoryQuestion('Please select the Item Number','User Defines what is to be used',1004,ItemNo);

 

Variable := AskQuestionNumericRange(‘Question’,’TYPE’,’Explanation’, MinValue , MaxValue, Increment,Current);

 

The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Question: Define the question (max 200 chars) enclosed on ‘commas’

TYPE: this is either DOUBLE or INTEGER

Explanation: A longer explanation that can be referenced during configuration

MinValue: The numeric value denoting the minimum value allowed during data entry

MaxValue: The numeric value denoting the maximum value allowed during data entry

Increment: A numeric value denoting the incremental steps within the range.  If nothing is entered then any value in the range will be accepted.

Current: Optional Entry to prefill question with current answer if re-doing questions

 

Example 1: DeskLengthInteger := AskQuestionNumericRange('Please enter the Length (mm) of the Desk', 'INTEGER','We can only make desks between 1000mm - 3000mm in length',1000,3000,10,DeskLengthInteger);

 

Example 2: DeskLengthDouble := AskQuestionNumericRange('Please enter the Length (m) of the Desk', 'DOUBLE','We can only make desks between 1.000m - 3.000m in length',1,3,0.01,DeskLengthDouble);

 

Variable := AskQuestion(‘Question’,’TYPE’, ‘Explanation’, ‘[d]List1, List2, List3’,Current);

 

The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Question: Define the question (max 200chars) enclosed on ‘commas’

TYPE: This is INTEGER, TEXT, DOUBLE, DATE, BOOLEAN, or TEXT LIST

Explanation: A longer explanation that can be referenced during configuration

[d]: Optional entry to define a default display entry from the List

List: Allowable options - separated by a comma

Current: Optional Entry to prefill question with current answer if re-doing questions

 

Example: TimberType := AskQuestion('Please select the type of Timber ','TEXT','Rimu provides a better finish','[d]Pine,Rimu',TimberType);

 

 

Generate the Custom Product

 

Within this step you can:

 

Access the Ostendo Database to get information

Define If / Then / Else conditions

Construct the finished Product

 

1.  The following functions are available to get information from the database

 

Variable := GetCost(‘CodeType’,’Code’);

 

This will access the Ostendo Database and get the Standard Cost of the selected Item, Descriptor, or Labour.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Code Type: Descriptor, Item or Labour

Code: The actual Code of the Descriptor, Item or Labour

 

Example: PartCost1 := GetCost('Item','10234A24');

 

Variable := GetStdSellPrice(‘CodeType’,’Code’);

 

This will access the Ostendo Database and get the Standard Sell Price of the selected Item, Descriptor, or Labour.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Code Type: Descriptor, Item or Labour

Code: The actual Code of the Descriptor, Item or Labour

 

Example: PartSell1 := GetStdSellPrice('Item','10234A24');

 

Variable := GetCustomerSellPrice(‘CodeType’,’Code’);

 

This will access the Ostendo Database and get the Sell Price of the selected Item, Descriptor, or Labour linked to the Customer defined in the Order.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Code Type: Descriptor, Item or Labour

Code: The actual Code of the Descriptor, Item or Labour

 

Example: CustSell1 := GetCustomerSellPrice('Item','10234A24');

 

Variable := GetStdBuyPrice(‘CodeType’,’Code’);

 

This will access the Ostendo Database and get the Standard Buy Price of the selected Item, Descriptor, or Labour.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

Code Type: Descriptor, Item or Labour

Code: The actual Code of the Descriptor, Item or Labour

 

Example: PartBuy1 := GetStdBuyPrice('Item','10234A24');

 

Variable := GetStringFromTable(‘TableName’,’FieldName’,’KeyField’,’KeyValue’);

 

This will access the Ostendo Database and get the contents of a field in a nominated record.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

TableName: The name of the Ostendo Table containing the string

FieldName: The Field Name within the Table containing the string

KeyField: The Field against which you are identifying the specific record

KeyValue: The Specific record identity within the Key Field

 

Example: PartString1 := GetStringFromTable('ITEMMASTER','ITEMBARCODE’,’ITEMCODE’,’10234A24');

 

Variable := GetBooleanFromTable(‘TableName’,’FieldName’,’KeyField’,’KeyValue’);

 

This will access the Ostendo Database and get the Boolean Value of a field in a nominated record.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

TableName: The name of the Ostendo Table

FieldName: The Field Name within the Table containing the Boolean Value

KeyField: The Field against which you are identifying the specific record

KeyValue: The Specific record identity within the Key Field

 

Example: PartYesNo1 := GetBooleanFromTable ('ITEMMASTER','WARRANTYAPPLIES’,’ITEMCODE’,’10234A24');

 

Variable := GetIntegerFromTable(‘TableName’,’FieldName’,’KeyField’,’KeyValue’);

 

This will access the Ostendo Database and get the Integer Value of a field in a nominated record.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

TableName: The name of the Ostendo Table

FieldName: The Field Name within the Table containing the number

KeyField: The Field against which you are identifying the specific record

KeyValue: The Specific record identity within the Key Field

 

Example: PartYesNo1 := GetIntegerFromTable ('ITEMMASTER','REORDERLEVEL’,’ITEMCODE’,’10234A24');

 

Variable := GetDoubleFromTable(‘TableName’,’FieldName’,’KeyField’,’KeyValue’);

 

This will access the Ostendo Database and get the numeric value including decimals of a field in a nominated record.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

TableName: The name of the Ostendo Table

FieldName: The Field Name within the Table containing the number

KeyField: The Field against which you are identifying the specific record

KeyValue: The Specific record identity within the Key Field

 

Example: PartYesNo1 := GetIntegerFromTable ('ITEMMASTER','AVERAGECOST’,’ITEMCODE’,’10234A24');

 

Variable := GetDateFromTable(‘TableName’,’FieldName’,’KeyField’,’KeyValue’);

 

This will access the Ostendo Database and get the date currently held in a field in a nominated record.  The elements that make up this function are:

Variable: The variable defined in the above ‘Var’ section

TableName: The name of the Ostendo Table

FieldName: The Field Name within the Table containing the date

KeyField: The Field against which you are identifying the specific record

KeyValue: The Specific record identity within the Key Field

 

Example: PartYesNo1 := GetIntegerFromTable ('ITEMMASTER','LASTCOSTDATE’,’ITEMCODE’,’10234A24');

 

2.  The following are predefined constants that are available to you

 

CUSTOMPRODUCTCUSTOMER = Order Customer Name

 

CUSTOMPRODUCTCODE = The ‘Custom’ Product Code

 

CUSTOMSALESORDERNUMBER = The Order Number containing this Custom Product

 

CUSTOMSALESLINEID = The Line No within the Order that contains this Custom Product

 

 

3.  The following are predefined constants that can be configured

 

CUSTOMPRODUCTDESCRIPTION := ‘Description’;

 

Where ‘Description' is your assemble description of the Custom Product

 

Example: CustomProductDescription := TimberType + ' Office Desk ' + IntToStr(DeskLength) + 'mm x ' + IntToStr(DeskDepth) + 'mm with ' + Drawers;

 

LINEQTY := Qty;

 

Where Qty is the evaluated quantity for this Order Line

 

ExampleLineQty := 24;

 

LINEUNITPRICE := Qty;

 

Where Qty is the evaluated Unit Sell Price for this Order Line

 

ExampleLineUnitPrice := 36.67;

 

 

4.  The following functions enable you to assemble the Bill of Material Steps, Lines, and Resources

 

InsertBOMHeader(‘Description’);

 

This is required to define that a BOM is being created.   The elements that make up this function are:

Description: A description of the created BOM (max 50 chars).  Blank if not specified

 

Example: InsertBOMHeader;

 

InsertBOMProperty(‘PropertyName’,’PropertyValue’);

 

If you wish to add Properties to the BOM then use this function.  The elements that make up this function are:

PropertyName: The name of the Property (max 20 chars)

PropertyValue: The value being applied to the Property Name (max 50 chars)

 

Example: InsertBOMProperty('Length',inttostr(DeskLength));

 

Note: The instruction inttostr(DeskLength) converted a numeric variable to a string format

 

SetBOMSetupDuration(SetupDuration,’SetupDurationScale’);

 

This defines the total duration to ‘set up’ in preparation for making the Custom Product.  The elements that make up this function are:

SetupDuration: Any Number including decimals

SetupDurationScale: Either ‘Hours’ or ‘Minutes’.  If nothing entered then Minutes is assumed

 

Example: SetBOMSetupDuration(15,'Minutes');

 

SetBOMRunDuration(RunDuration,’RunDurationScale’);

 

This defines the total duration to make the Custom Product.  The elements that make up this function are:

RunDuration: Any Number including decimals

RunDurationScale: Either ‘Hours’ or ‘Minutes’.  If nothing entered then Minutes is assumed

 

Example: SetBOMRunDuration(45,'Minutes');

 

SetBOMInstructions(‘BOMInstructions’);

 

This defines the detailed instructions to make the Custom Product.  The elements that make up this function are:

BOMInstructions: Unlimited amount of text to describe the actions required to make the product

 

Example: SetBOMInstructions('Cut the 2000mm Rimu Panel down to ' + inttostr(DeskLength) + 'mm ');

 

SetBOMLeadTime(LeadTime);

 

This defines the anticipated Leadtime to product the Custom Product.  The elements that make up this function are:

LeadTime: The number of Days (integer only) required to produce the product

 

Example: SetBOMLeadTime(2);

 

InsertBOMStep(‘StepName’,StepSequence,’StepDescription’,’StepInstructions’);

 

This will create a Bill of Material Step.  The elements that make up this function are:

StepName: The name that you are applying to the Step (max 20 chars)

StepSequence: A number defining the sequence in which the Step will be carried out

StepDescription: A brief description of the Step (max 50 chars)

StepInstructions: Unlimited Text defining what happens in this Step

 

Example: InsertBOMStep('Cut',10,'Cut and Trim all Timber','Check the measurements');

 

InsertBOMResource(‘StepName’,’ResourceType’,’ResourceName’);

 

This will add a Resource to a process Step.  The elements that make up this function are:

StepName: The Step Name - The step should be created as defined above

ResourceType: Must be either ‘ASSET’ or ‘EMPLOYEE’

ResourceName: The name of the Asset or Employee (max 30 chars)

 

Example: InsertBOMResource('Cut','Employee','John');

 

InsertBOMLine(‘StepName’,’CodeType’,’LineCode’,LineQty,LineNumber,ScrapPercent,’RunOrSetup’,’PosReference’,’LineInstructions’);

 

This will add a Line to a step in the Bill of Material.  The elements that make up this function are:

StepName: The Step Name - The step should be created as defined above

CodeType: Must be Descriptor, Item or Labour

LineCode: The name of the Descriptor, Item or Labour (max 50 chars)

LineQty: The quantity required against this line

LineNumber: Any Integer to define a Line number

ScrapPercent: Any Number (incl decimals).  Zero if it does not apply

RunOrSetup: Enter either Run or Setup

PosReference: Enter a position reference if applicable

LineInstructions: Unlimited amount of text to add Instructions

 

Example: InsertBOMLine('Cut','Item','RIMUPANEL1600X600',1,10,0,'Run','','');

 

You should note that if the line being inserted is a Bill of Material Parent flagged as a Phantom then all the Components of the Item will be copied and not the Item itself

 

InsertOrderLine(‘CodeType’,’LineCode’,LineQty,UnitPrice);

 

This function allows you to add new lines to the originating Sales or Job Order.  This emulates an ‘Add-On Sale’ type function such as you also supply a ‘Chair’ when you configure a Desk. The elements that make up this function are:

CodeType: Must be Descriptor, Item or Labour

LineCode: The name of the Descriptor, Item or Labour (max 50 chars)

LineQty: The quantity required against this line (incl Decimals)

UnitPrice: The Unit Sell Price for this Line (incl Decimals)

 

Example:  InsertSOLine('Item','OFFICECHAIR',1,135);

 

5.  Other functions

 

Variable := RoundToDecimalPrecision(Variable1,DecimalPlaces);

 

This function allows you to round any evaluated Variable to a defined number of decimal places.  The elements that make up this function are:

Variable: The variable in the above ‘Var’ section to which the result will be posted

Variable1: The variable in the above ‘Var’ section to which this is being applied

DecimalPlaces: Number of decimal places required (defaults to 2 if not specified)

 

6.  Functions and Procedures

 

If you press the F2 key then a full list of classes and functions will be presented

 

 

Buttons

 

Close: This will close the Custom Products screen.  If you have any unsaved data then you will be asked if you wish to save it before the screen is closed.

 

Add: This will bring up a panel for entry of the following information that is required when creating a new Custom Product

Create Custom Product From Scratch: If this radio button is ‘checked’ then the next field must be completed

Item:  From the drop-down list select the Item against which the Custom Product Script will be created.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

Copy Custom Product Design from another Item: If this radio button is ‘checked’ then the next two fields must be completed

Select an Item with an existing Custom Design: From the drop-down list select an Item.   Its Custom Product Script will then be copied to the new Product where it can be amended if required

Copy Custom Design To:  From the drop-down list select the Item against which the Custom Product Script will be copied.  This list will only show those Items that have Sourced By of 'Custom' and Configured By of 'Rules'

 

Buttons

Create: Click the ‘create’ button to take you to the ‘Details’ tab for entering further information.

Cancel: Click the ‘cancel’ button to exit this panel

 

Save: This will save the current data without exiting the screen

 

Cancel: Any changes made since the screen was opened or the last time the ‘Save’ Button was pressed will be lost.

 

Delete: Not applicable to the 'Script' tab

 

Related: This will bring up a list of functions that are related to Custom Products.  You may open and maintain information in those screens whilst still remaining in the Custom Products screen.

 

Reports: This will bring up a list of Reports that are related to the Custom Products. You can immediately run the report whilst still remaining in the Custom Products screen.

 

Test Script: This will run through the script and display the results in the 'Function Results' tab.

 

Load From File: This will allow you to point to a .txt file and import the content of that file into this screen.

 

 

Function Result Tab

 

This tab displays the results after clicking on the 'Test Script' button in the 'Script' screen