ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML xmlns="http://www.w3.org/1999/xhtml"><head> <TITLE>Create User Defined Functions</TITLE> <meta name="keywords" content="Create User Defined Functions,How to Create User Defined Functions,User Defined Functions"> <meta name="description" content="Prescient Author database driven project development company gives Rapid Application Development, C# code generator, india, ASPX code generator, pune, RAD tool for database applications, dot net development, database application development, collaborative development tool, automated form development company"> <meta name="robots" content="index,all"> <meta name="distribution" content="global"> <meta name="rating" content="General"> <meta name="audience" content="all"> <meta http-equiv="Content-Language" content="en"> <META content="MSHTML 6.00.2900.2853" name=GENERATOR> <STYLE type=text/css> <!-- .style1 {color: #0000CC} --> </STYLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <BODY> <H1>Creating User Defined Functions</H1> <P>&nbsp;</P> <P>You can write user defined code in the files generated by Prescient Author.</P> <P>Prescient Author generates one file named TableName_partial in the <STRONG>Basemodule</STRONG> -&gt;CS folder. This file do not get overwritten by Prescient Author each time you select <STRONG>WriteAll</STRONG> from the Prescient Author.Therefore you can include your code in this file so that this code will not get overwritten.</P> <P>Following are steps to create user defined function</P> <OL type=1> <LI>Right click on <STRONG>User defined function </STRONG>option in <STRONG>Module Section </STRONG>of<STRONG> Project Tree. </STRONG>Select&nbsp;<STRONG>Create Functionl</STRONG> option. <STRONG>OR </STRONG>click on theUser defined function button on the Prescient Author Navigator dialog box.&nbsp; <LI>Select the module name from <STRONG>Module</STRONG> drop down list. <LI>Select the class name in which you ve written the function from <STRONG>Class</STRONG> drop down list. <LI>Select the function name from <STRONG>Function</STRONG> drop down list. <LI>If your function includes some other tables then select the select the module on which that table belongs, from <STRONG>Module</STRONG> drop down list. <LI>Select table name from <STRONG>Dependent Table</STRONG> drop down list. <LI>Click on <STRONG>Add</STRONG> Button. <LI>To add output fields for this user defined function click on <STRONG>Add Output Field</STRONG>. (Refer to <A href="AddOutputField4Function.html"><STRONG>Adding and deleting Output Field for user defined functions</STRONG></A>). <LI>To add the function click on <STRONG>Add</STRONG> function. <LI>To cancel the changes click on <STRONG>Cancel</STRONG> Button. </LI></OL> <P><STRONG></STRONG>&nbsp;</P> <P><STRONG>Example of user defined function</STRONG></P> <P>Following example shows 'SelectIssuedBooksForMember_id ' user defined function.</P> <P><IMG alt="" hspace=0 src="./UI/User Defined Functions/UserDefinedFunction.JPG" align=baseline border=0></P> <P class=style1>&nbsp;</P> <P><STRONG></STRONG>&nbsp;</P></BODY></HTML>