Here is a utility from Siebel Systems that converts VBScript to eScript. After conversion it is not totally done but you should be 85% on your way.
Click on the below icon to download the converter.

Cheers!
In Siebel versions 6.x and 7.x, there are several number fields such as SR Number, Agreement Number, Asset Number, and Invoice Number which have the Pre Default Value = Expr: 'RowIdToRowIdNum ([Id])'. RowIdToRowIdNum is a function used in calculated expressions. This function converts an alphanumeric ROW_ID to a unique, pure numeric ROW_ID.
The conversion is performed for digits and letters after or before the hyphen '-'. The formula used by RowIdToRowIdNum is the following:
[Last digit or letter * 36^0] + [Second to last digit or letter * 36^1] + [Third to last digit or letter * 36^2] + ...+ [Second digit or letter * 36^n-1)] + [First digit or letter * 36^n]
By design, values of letter A is 10, B is 11, C is 12 ... Y is 34, and Z is 35.
Take the example of ROW_ID = 1-5GYG0.
0 * 36^0 = 0
G * 36^1 = 16 * 36 = 576
Y * 36^2 = 34 * 36 * 36 = 44064
G * 36^3 = 16 * 36 * 36 * 36 = 746496
5*36^4 = 5 * 36 * 36 * 36 * 36 = 8398080
0 + 576 + 44064 + 746496 + 8398080 = 9189216
1 * 36^0 = 1 * 1 = 1
The final converted ROW_ID is 1-9189216.
ROW_ID G-5GYG0
This ROW_ID is the same as the ROW_ID in example 1 with the exception of the letter to the left of the hyphen, 'G'. Using the same conversion, G-5GYG0 would be 16-9189216 where G, the letter to the left of the hyphen, gets converted to 16.
The final converted ROW-ID is 16-9189216.
ROW_ID = 1-IB79I
Using the same conversion, 1-IB79I would be 1-30755718 where '1', the digit to the left of the hyphen, gets converted to 1.
The final converted ROW_ID is 1-30755718.
Have a nice day!
Pre-Default and Post Default are two important field user properties available to us.
Both properties have same purpose of assigning a Default value to a field in case user doesn’t provide any value. What is important to remember is that these values only take effect if user doesn’t provide any value.
Pre-Default value takes effect in case New Record and Copy Record event (In case copy record only if value of field is blank at the time of copy record)
Post-Default value takes effect when we save the record for the first time after its creation and the field value is blank. In Subsequent updates Post Default value doesn’t take effect.
Post-Default Values can are very commonly used to save the user's time by auto-populating fields.
Example of how these two properties work:
We will assume the following values have been given for Pre-Default and Post-Default properties of Status Field
Pre-Default Value: “Open”
Post-Default Value: “Closed”
Following are the scenarios which can take place:
User creates a New Record and saves the record without changing value of status field:
Pre-Default value (Open) will be assigned to Status field.
User creates a New Record and changes the value of Status field to “Transferred”
Pre-Default value is going to take effect as soon as user creates a new record but Post-Default value will not take effect.
User creates a New Record and changes the value of Status field to blank
Post Default Value (”Closed”) will take effect
User copies an existing record where value of status field is “Transferred”
Neither Post-Default nor Pre-Default will take effect
User copies an existing record where value of status field is blank
Pre-Default (”Open”) Value will take effect
User copies an existing record and makes the value of the field as blank
Post-Default Value (”Closed”) will take effect
User changes the value of existing record to blank and saves the record.
Neither Post-Default nor Pre-Default will take effect as these values only takes when the record is initially created and saved.
Example: Automating population of fields.
Requirment: In Service Requests when the user creates a new record the status should be set to 'Open' automatically.
here is one way of doing it...
Step1: Create a calculated field for setting Default Status
Name: Default Status
Calculated Value: LookupValue("SR_STATUS","Open")
SR_STATUS is the Type Value of the picklist.
Step 2: Assuming there is a field called Status. just add the following to Pre-Default property of the Status field
Pre-Default value: Field: "Default Status" (the calculated field we just created)
Now when you create a new SR record, the status will default to Open
Have a nice day!