/*
 * Author       : hillp
 * Generated on : 24-Nov-2009 13:39:43
 * Version      : 3.0
 */
application "King Light Levels"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Home
    {
        form  Data_Entry
        {
            displayname  =  "Data Entry"
            
            column
            {
                Date_Time_1
                (
                    displayname  =  "Date and Time"
                    type  =  datetime
                )

                Room_Number
                (
                    displayname  =  "Room Number"
                    type  =  number
                    width  =  20
                )

                Lamp_Type
                (
                    displayname  =  "Lamp Type"
                    type  =  picklist
                    values  =  {"Fluorescant, bare bulbs",   "Fluorescent, covered bulbs",   "Fluorescent, square reflectors",   "Incandescent"}
                )

                How_Many_Light_Switches_are_On
                (
                    displayname  =  "How Many Light Switches are On"
                    type  =  picklist
                    values  =  {"All Off",   "Half On",   "All On"}
                )

                Outdoor_Weather_Conditions
                (
                    displayname  =  "Outdoor Weather Conditions"
                    type  =  picklist
                    values  =  {"Bright Sun (0-25% clouds)",   "Partly Cloudy (25-50% clouds)",   "Mostly Cloudy (50-75% clouds)",   "Cloudy (75-99% clouds)",   "Overcast (100 % clouds)"}
                )

                Precipitation
                (
                    type  =  picklist
                    values  =  {"None",   "Fog",   "Drizzle/Mist",   "Light Rain",   "Rain",   "Heavy Rain"}
                )

                Light_Level_ft_cd
                (
                    displayname  =  "Light Level (ft cd) of Work Surface Closest to Window"
                    type  =  number
                    width  =  20
                )

                Light_Level_ft_cd_of_Work_Surface_Furthest_from_Window
                (
                    displayname  =  "Light Level (ft cd) of Work Surface Furthest from Window"
                    type  =  number
                    width  =  20
                )

            }
            column
            {
                Other_Notes
                (
                    displayname  =  "Other Notes"
                    type  =  textarea
                )

            }
            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Data_Entry_View
        {
            displayname = "Data Entry View"
            show  all  rows  from  Data_Entry 
            (
                Room_Number as "Room Number"
                Date_Time_1 as "Date - Time 1"
                Outdoor_Weather_Conditions as "Outdoor Weather Conditions"
                Precipitation
                Light_Level_ft_cd as "Light Level (ft cd)"
                Other_Notes as "Other Notes"
                Lamp_Type as "Lamp Type"
                Light_Level_ft_cd_of_Work_Surface_Furthest_from_Window as "Light Level (ft cd) of Work Surface Furthest from Window"
                How_Many_Light_Switches_are_On as "How Many Light Switches are On"
            )
            filters 
            (
                Lamp_Type
                How_Many_Light_Switches_are_On
                Outdoor_Weather_Conditions
                Precipitation
            )
            options
            (
                display rows = 100
            )
        }

    }

}
