/*
 * Author       : zchelp
 * Generated on : 24-Nov-2009 13:18:28
 * Version      : 3.0
 */
application "Show Current Record"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Home
    {
        form  Form1
        {
            
            Name
            (
                type  =  text
            )

            Number
            (
                type  =  number
                width  =  20
            )

            City
            (
                type  =  text
            )

            TXT
            (
                type  =  text
                private  =  true
                defaultvalue  =  "new"
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on validate
                        {
                            if (count(Form1[TXT == "new"])  >  0)
                            {
                                dat  =  Form1  [TXT == "new"];
                                dat.TXT = "old";
                            }
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Current_Record
        {
            displayname = "Current Record"
            show  all  rows  from  Form1 [TXT == "new"]
            (
                Name
                Number
                City
            )
            options
            (
                display rows = 100
            )
        }

        list  All_Records
        {
            displayname = "All Records"
            show  all  rows  from  Form1 
            (
                Name
                Number
                City
                TXT
            )
            options
            (
                display rows = 100
            )
        }

    }

}
