Creating User Defined Functions

 

You can write user defined code in the files generated by Prescient Author.

Prescient Author generates one file named TableName_partial in the Basemodule ->CS folder. This file do not get overwritten by Prescient Author each time you select WriteAll from the Prescient Author.Therefore you can include your code in this file so that this code will not get overwritten.

Following are steps to create user defined function

  1. Right click on User defined function option in Module Section of Project Tree. Select Create Functionl option. OR click on theUser defined function button on the Prescient Author Navigator dialog box. 
  2. Select the module name from Module drop down list.
  3. Select the class name in which you’ve written the function from Class drop down list.
  4. Select the function name from Function drop down list.
  5. If your function includes some other tables then select the select the module on which that table belongs, from Module drop down list.
  6. Select table name from Dependent Table drop down list.
  7. Click on Add Button.
  8. To add output fields for this user defined function click on Add Output Field. (Refer to Adding and deleting Output Field for user defined functions).
  9. To add the function click on Add function.
  10. To cancel the changes click on Cancel Button.

 

Example of user defined function

Following example shows 'SelectIssuedBooksForMember_id ' user defined function.