Why does the cursor jump back to the first visible field from the middle during entering/editing?

Discussion in 'Knowledge Base' started by admin, May 17, 2013.

         
Loading...
  1. admin

    admin Administrator Staff Member


    Query

    Why does the cursor jump back to the first visible field from the middle during entering/editing?

    Solution

    This usually happens when there is an Option, Switch or an Invisible condition specified for any Part or Line and the condition is based on the user input within the same form.

    Example

    If user selects Bank Ledger, then display Cheque No. Field else make it Invisible. Hence, when the line is being removed or added, the entire form gets repainted as if we are entering this Report from a Menu Item.

    The Solution to this issue is instead of having an Option, Switch or Invisible condition, set all the fields within the required line to Inactive based on condition. Here, the form need not refresh since there is no new line getting added or removed as the line is always available. Only the field contents are inactive.
     
    Mahesh Sethi, HVPatel and Ras Raj like this.




  2. This is really a great knowledge share !
     




  3. Good information !. I made correction in my TDL as per this information. Now cursor does not go back to the first visible field.
    Thank you Admin !
     



  4. kamal

    kamal Member


    Dear Sir,
    Thanks in advance for sharing the above code
    based on this i have create two formats for sales SMALL BILL AND A4
    its working fine when selecting bill format SMALL OR A4 again cursor is jumping to date filed
    please check this below code
    ;;;;;;;;;;;;;;;
    ;;PRINT SMALL OR A4 PAPER
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [#Part: VCH Narration]
    Add: Option: Select Bill Format : $$IsSales:$VoucherTypeName
    [!Part: Select Bill Format ]
    Add: Line: At Beginning: Select Bill Format Line

    [Line: Select Bill Format Line]
    Field: Short Prompt, Select Bill Format Field
    Local: Field: Short Prompt: Info : "Bill Format : "

    [Field: Select Bill Format Field]
    Use : Name Field
    Table : BillSelectionTable
    Show Table : Always
    Storage : BillFormat

    [Table: BillSelectionTable]
    Title : "LIST"
    List : " ","Small" , "A4"

    [System: UDF]
    BillFormat : String : 1666

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [#Form : Sales Color]
    Option : SmallPrint : $BillFormat contains "Small"
    Option : A4Print : $BillFormat contains "A4"

    ;;;;;;;;;;;;; for small print;;;;;;;;;;;;;;;;;;
    [!Form : SmallPrint]
    Delete :print
    Add :print :pkhrInvocieSmall
    [Report : PkhrInvocieSmall]
    Use : Voucher
    Form : PkhrInvocieSmall
    PrintSet : Report Title : If NOT (##OptionalFlag) AND @@IsSales then $VchPrintTitle:VoucherType:##SVVoucherType else @@InvTitle
    PrintSet : Report SubTitle : @@InvSubTitle
    PrintSet : SVPrintCopies : @@InvCopies
    Print : VCHPrintConfigure
    Delete : Set
    [Form : PkhrInvocieSmall]
    Parts : AMains,InvHeading, GI OpPgBrk, Global Invoice Body
    Bottom Parts: Global Invoice Bottom
    Page Break : GI ClPgBrk, GI OpPgBrk
    ;Width : 210 mms
    Height : 5.9 INCH
    Space Top : 2% Page
    Space Bottom : 2% Page
    Space left : 5% Page
    Space Right : 4% Page



    ;;;;;;;;;;;;;;;;;;;;;;; for A4 PRINT ;;;;;;;;;;;;;;;;;
    [!Form : A4Print]
    Delete :print
    Add :print :pkhrInvociea4

    [Report : PkhrInvociea4]
    Use : Voucher
    Form : PkhrInvociea4
    PrintSet : Report Title : If NOT (##OptionalFlag) AND @@IsSales then $VchPrintTitle:VoucherType:##SVVoucherType else @@InvTitle
    PrintSet : Report SubTitle : @@InvSubTitle
    PrintSet : SVPrintCopies : @@InvCopies
    Print : VCHPrintConfigure
    Delete : Set

    [Form : PkhrInvociea4]
    Parts : AMains,InvHeading, GI OpPgBrk, Global Invoice Body
    Bottom Parts: Global Invoice Bottom
    Page Break : GI ClPgBrk, GI OpPgBrk
    ;Width : 210 mms
    Height : 11.27 INCH
    Space Top : 2% Page
    Space Bottom : 2% Page
    Space left : 5% Page
    Space Right : 4% Page
     



Share This Page