Programmer Interface
This feature allows you to type in an Omnis Studio program that can then be run. It is often the case that you want to do something with the data, perhaps to repair an error, that can only be done by a specifically written program. Such programs need to be treated with great caution and should only be written by a professional.
Field |
Description |
---|---|
Code Text |
Type or paste in Omnis Studio code. When you leave the field, it will be syntax checked. |
Button |
Action |
---|---|
Run This Program |
Click to run the program that has been typed in. |
Revert to Saved |
Reverts to the previous state of the saved program. |
Save Program |
Saves the program for future use. |
Standard System Methods
The following standard methods can be used:
Method syntax |
Example or parameters |
Function |
---|---|---|
$ctask.tData.$EditPrepNoQuit() |
Set main file {CUSFILE} |
Multi-user prepare for edit. Sets the current record of the main file into edit mode and locks it. Must be followed by an Update files command and the file must be in read/write mode. |
$ctask.tData.$InsertNoQuit() |
Set main file {CUSFILE} |
Multi-user prepare to insert. Prepares to insert a record in the current main file. Must be followed by an Update files command and the file must be in read/write mode. |
$ctask.tData.$DeleteRecord() |
Set main file {CUSFILE} |
Multi-user delete. Deletes the current record in the main file. There is no need to set the file to read/write mode. |
$ctask.tData.$BuildCompList(pAssyPartNo, pAssyQty, pResultList, pIncludeNType, pIncludeBulk, pSort, pConsolidateByPart, pBuildLocationList, pLocationList, pCalculateCosts, pCostRow, pCostBulkNOnly) |
Parameters: |
Builds a list of components for an assembly. pResultList must be predefined with a minimum of BOMFILE columns and will be populated by component part record values if it contains a PTMTYPE column. pLocations will only be populated if PTMMLOC and PTMTRAC are defined columns. |
$ctask.tEnv.$Str(pStringCode, p1, p2, p3, p4, p5, p6) |
Calculate #S1 as $ctask.tEnv.$Str(14265,$cdata.$pathname) |
Returns an evaluated string from the String file Stings.stb |
$ctask.tEnv.$Ok(pTitle, pIcon, pBell, pCancel, pStrNo, p1, p2, p3, p4, p5, p6) |
Parameters: |
Opens an OK message to the user and logs it in the Message List. |
$ctask.tEnv.$No(pTitle, pIcon, pBell, pCancel, pStrNo, p1, p2, p3, p4, p5, p6) |
Parameters: |
Opens a No/Yes message to the user and logs it and the user response in the Message List. Sets the flag #F if the response is Yes. |
$ctask.tEnv.$Yes(pTitle, pIcon, pBell, pCancel, pStrNo, p1, p2, p3, p4, p5, p6) |
Parameters: |
Opens a Yes/No message to the user and logs it and the user response in the Message List. Sets the flag #F if the response is Yes. |
$ctask.tEnv.$GetExtremeChar() |
|
Returns the extreme character used in range searches. |
$ctask.tEnv.$GetExtremeDate() |
|
Returns the extreme short date used in range searches. |
$ctask.tEnv.$GetExtremeDateTime() |
|
Returns the extreme date time used in range searches. |
Compiled in Program Version 5.10. Help data last modified 4 Jun 2012 04:47:00.00. Class wProgram last modified 10 Oct 2017 11:48:32.