
/*
Objective(s) -
-	This code demonstrates the usage of UDF
-	This code is written to add a new line into Company Accounting Feature screen and associate an UDF within Company 
	Object
*/

;;Addition of optional part in accounting feature

[#Part: CMP AccFeat Right]

	Option	: TSPL Smp NR CMP AccFeat Right	: NOT $$IsRemoteCompany     ;;;$$IsRemoteCompany is inbuilt function to check whether feature is running in remote enviornment
                                                                        ;;;This TDL will not work in remote enviornment

	[!Part: TSPL Smp NR CMP AccFeat Right]

		Add	: Lines		: CMP Student Fees Feature

		[Line: CMP Student Fees Feature]

			Fields      : Medium Prompt, CMP Student Fees Feature
			Local       : Field : Medium Prompt : Info    : $$LocaleString:"Enable Student Module?"
			Space Top   : 0.4

			[Field: CMP Student Fees Feature]
			
				Use		: Logical Field
				Storage	: Student Feature                               ;;;Storage created to store the value 
				Sub Form: Course Offered to Students : $$Value = "Yes"  ;;; New form will open when "Yes" is set in the field
                
;;----------------------------------------------------------------------------------------------
	 
;;New report is triggered to capture course names

[Report: Course Offered to Students]

	Form		: Course Offered to Students
	Object		: Company                        ;;;Company object is associated at the form level. All the values will be stored at company level

[Form: Course Offered to Students]

    Part        : FormSubTitle, Course Offered to Students
    FullWidth   : No                             ;;;Wont take the full width of the screen
    Height	: 90% Screen                     ;;;Screen height is set to 90% of the screen
    Background  : @@SV_CHEQUE                    ;;;Setting the background colour of the form to green
    SpaceRight  : 0.5
    SpaceLeft   : 1.5                            ;;;Space left is provided as 1.5
    Local       : Field : Form SubTitle : Info  : $$LocaleString:"Course Offered to Students"
    Option      : Small Size Form

[Part: Course Offered to Students]

    Lines       : CMP Course Offered
    Repeat      : CMP Course Offered   : Course Offered    ;;;Repeating the line on course offered repeating UDF
    Break on    : $$IsEmpty:$CourseOffered                 ;;;Line repeating will break when the field value is blank
    Scroll	: Vertical                                 ;;;Line repeating will happen in vertical direction
    Height      : 50% Screen                               ;;;Setting the height of the part as 50% of screen

    [Line: CMP Course Offered]

        Fields      : Multi SNo, CMPCourse Offered
        Local       : Field : Default : Delete : Border     ;;;Locally deleting the border of the fields

        [Field: CMPCourse Offered]

            Use     : Short Name Field 
            Storage : Course Offered                        ;;;Storage in field stores the value 
            Unique  : Yes 

;;;Defining the storages to store field values

[System: UDF]

;;; Storage Name    : Type of Storage   : Index

    Student Feature: Logical	: 1000

;;; Storage Name    : Type of Storage   : Index : Isrepeating in nature     

	Course Offered 	: String	: 1010	: Yes

     
;; End-of-File
