;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* Objective(s) - This program illustrates the use of following attributes of Field ASCII Only KBLanguage Info Cancel Max Local Local Formula Tooltip Control Notify Valid */ [#Menu: Gateway of Tally] Add: Item: ($$LocaleString:"Special Field Input") : Alter: TSPL Special Input [Report: TSPL Special Input] Form : TSPL Special Input [Form: TSPL Special Input] Parts : TSPL Special Input Width : 60% Screen [Part: TSPL Special Input] Lines : TSPL Special Input Hindi, TSPL Special Input Age, TSPL Special Input ASCII, TSPL Special Input Application Number [Line: TSPL Special Input Hindi] Field : TSPL Prompt Field, TSPL Special Input Hindi ;;Value of field set wit Local modifier so that the change reflects only in the context of this line Local : Field : TSPL Prompt Field : Info : "Enter Name in Hindi" ;;Value set using info so that field is skipped and non editable [Field: TSPL Special Input Hindi] Use : NameField KBLanguage : @@HindiLanguageId ;;The keyboard language is Hindi Validate : Not $$Isempty:$$Value ;;Field will not be accepted until a value is entered [Line: TSPL Special Input Age] Field : TSPL Prompt Field, TSPL Special Input Age ;;Value of field set wit Local modifier so that the change reflects only in the context of this line Local : Field : TSPL Prompt Field : Info : "Enter Age" ;;Value set using info so that field is skipped and non editable [Field: TSPL Special Input Age] Type : Number Max : 2 ;;Only 2 numbers accepted Validate : Not $$Isempty:$$Value ;;Field will not be accepted until a value is entered Notify : TSPLAgeNotify : @AgeNotify ;;If user enters age lesser than 18 or more than 40 he is notified with a message AgeNotify : $$Value <18 OR $$Value >40 ;;Local Formula used in Notify attribute [Line: TSPL Special Input ASCII] Field : TSPL Prompt Field, TSPL Special Input ASCII ;;Value of field set wit Local modifier so that the change reflects only in the context of this line Local : Field : TSPL Prompt Field : Info : "Enter a 4 Digit Code" ;;Value set using info so that field is skipped and non editable [Field: TSPL Special Input ASCII] Max : 4 ;;Only 4 characters accepted ASCII Only : Yes ;;Only ASCII characters accepted KBLanguage : @@EnglishLanguageID ;;Keyboard language set to english Tooltip : "The Code should match the pattern AB12" ;; A tooltip giving info on the pattern of code appears when hovered over the field Control : TSPLPatternMatch : @Cotrlcond ;; A message pops up if pattern doesn match. user is not allowed to move forward untill input matches the pattern Cotrlcond : $$IsEmpty:$$Value OR NOT ($$IsPatternMatch:$$Value:@Pattern) ;; Local Formula used in control attribute Pattern : "^([a-zA-Z]{2}[0-9]{2})$" ;; Local Formula used in control attribute [Field: TSPL Prompt Field] Align : Prompt Width : @@MediumWidth [Line: TSPL Special Input Application Number] Field : TSPL Special Input Application Number [Field: TSPL Special Input Application Number] Use : NameField Set as : "Your application number is " + $$String:@RandNum Set Always : Yes Inactive : @Patterncond ;;The field is inactive untill the entered code matches the pattern RandNum : $$RandomNumber:10000:99999 ;;Local formula used in set as attribute Patterncond : NOT ($$IsPatternMatch:#TSPLSpecialInputASCII:@Pattern) ;;Local formula used in inactive attribute Pattern : "^([a-zA-Z]{2}[0-9]{2})$" ;;Local formula used in inactive attribute Read Only : Yes ;;This field is in read only mode, but cursor goes here [System: Formula] TSPLPatternMatch: "First 2 characters should be alphabets and next 2 should be numbers" TSPLAgeNotify : "Since the age entered is not between 18 and 40, your application might not be considered" ;;EOF