Results 1 to 10 of 21

Thread: Simple unconditional constraint not working

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2016
    Location
    Point Cook, Victoria, Australia
    Posts
    519

    Angry Simple unconditional constraint not working

    Hi Everyone,

    A simple constraint is not working. I have extremely complex constraints in other applications and yet this simple one doesn't work - what am I missing?

    Staff.Retired is a date and does not participate in any index. I simply wish to show the staff in the lookup list WITHOUT the staff who have retired.

    I've tried everything that I can think of and yet the lookup list continues to show ALL the staff. I have one staff member that has a retirement date of 01/10/2021 and he continues to appear in the list.

    I'm about ready to throw my PC out the window!!!

    Code:
    // Staff.sl
    // Staff Lookup List
    
    Use DFClient.pkg
    Use cDbCJGridPromptList.pkg
    Use cDbCJGridColumn.pkg
    Use Windows.pkg
    
    Use Staff.DD
    
    Object Staff_sl is a dbModalPanel
        Set Location to 5 5
        Set Size to 242 610
        Set Label To "Staff Lookup List"
        Set Border_Style to Border_Thick
        Set Minimize_Icon to False
        
        Object oStaff_DD is a Staff_DataDictionary
            Procedure OnConstrain
                Constrain Staff.Retired eq ""
            End_Procedure
        End_Object
    
        Set Main_DD To oStaff_DD
        Set Server  To oStaff_DD
    
    
    
        Object oSelList is a cDbCJGridPromptList
            Set Size to 213 600
            Set Location to 5 5
            Set peAnchors to anAll
            Set psLayoutSection to "Staff_sl_oSelList"
            Set Ordering to 1
            Set pbAutoServer to True
    
            Object oStaff_Id is a cDbCJGridColumn
                Entry_Item Staff.Id
                Set piWidth to 46
                Set psCaption to "Id"
            End_Object 
    
            Object oStaff_Surname is a cDbCJGridColumn
                Entry_Item Staff.Surname
                Set piWidth to 250
                Set psCaption to "Surname"
            End_Object 
    
            Object oStaff_First_Names is a cDbCJGridColumn
                Entry_Item Staff.First_Names
                Set piWidth to 250
                Set psCaption to "First Names"
            End_Object 
    
            Object oStaff_EmployeeType is a cDbCJGridColumn
                Entry_Item Staff.EmployeeType
                Set piWidth to 66
                Set psCaption to "Type"
            End_Object 
    
            Object oStaff_Email is a cDbCJGridColumn
                Entry_Item Staff.Email
                Set piWidth to 250
                Set psCaption to "Email"
            End_Object 
    
            Object oStaff_DOB is a cDbCJGridColumn
                Entry_Item Staff.DOB
                Set piWidth to 100
                Set psCaption to "DOB"
            End_Object 
    
            Object oStaff_Retired is a cDbCJGridColumn
                Entry_Item Staff.Retired
                Set piWidth to 100
                Set psCaption to "Retired"
            End_Object 
    
            Object oStaff_Created is a cDbCJGridColumn
                Entry_Item Staff.Created
                Set piWidth to 100
                Set psCaption to "Created"
            End_Object 
    
            Object oStaff_Edited is a cDbCJGridColumn
                Entry_Item Staff.Edited
                Set piWidth to 100
                Set psCaption to "Edited"
            End_Object 
    
    
        End_Object 
    
        Object oOk_bn is a Button
            Set Label to "&Ok"
            Set Location to 223 447
            Set peAnchors to anBottomRight
    
            Procedure OnClick
                Send OK of oSelList
            End_Procedure
    
        End_Object 
    
        Object oCancel_bn is a Button
            Set Label to "&Cancel"
            Set Location to 223 501
            Set peAnchors to anBottomRight
    
            Procedure OnClick
                Send Cancel of oSelList
            End_Procedure
    
        End_Object 
    
        Object oSearch_bn is a Button
            Set Label to "&Search..."
            Set Location to 223 555
            Set peAnchors to anBottomRight
    
            Procedure OnClick
                Send Search of oSelList
            End_Procedure
    
        End_Object 
    
        On_Key Key_Alt+Key_O Send KeyAction of oOk_bn
        On_Key Key_Alt+Key_C Send KeyAction of oCancel_bn
        On_Key Key_Alt+Key_S Send KeyAction of oSearch_bn
    End_Object // Staff_sl
    Regards,
    Rachael
    Last edited by Rachael; 19-May-2022 at 12:50 PM.
    Regards,
    Rachael Warlond

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •