Results 1 to 10 of 18

Thread: cWebColumnLink doesn't appear to always have a row id

Threaded View

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

    Default Re: cWebColumnLink doesn't appear to always have a row id

    Hi Samuel,

    I've been experimenting with different code variations and I believe that this is the correct way to apply a dynamic contraint on a data dictionary and still keep within the 'rules' of the round-trip concept.

    Your comments would be appreciated.

    Code:
    Object oPDOWorksheet is a cWebView
        Set piColumnCount to 12
        Set psCaption to "PDO Worksheet"
        Set piWidth to 2500
        Set pbClearAfterSave to False
        Set pbClearKeys to False
        Set pbDeleteKeys to False
        Set Auto_Fill_State to True
        
        {WebProperty = Server}
        Property Boolean pbActiveJobs True
           
        // Other data dictionaries here
    Code:
    
    
        Object oSched_DD is a Sched_DataDictionary
            // This lets you save a new parent DD from within child DD.
            // I need this here so that when a row is created or altered
            //  then if Should_Save is true it will save the header.
            Set Allow_Foreign_New_Save_State to True
        End_Object 
     
       Object oScheddtl_DD is a Scheddtl_DataDictionary
            Set DDO_Server to oSched_DD
            Set DDO_Server to oSHIP_DD
            Set DDO_Server to oBERTHIN_DD
            Set DDO_Server to oBERTHOUT_DD
            Set DDO_Server to oAGENT_DD
            Set DDO_Server to oPILOT_DD
            Set Constrain_File to Sched.File_Number
     
           Procedure onConstrain
                Boolean bRetval
                WebGet pbActiveJobs of oPDOWorksheet to bRetval
                If (bRetval = True) Constrain Scheddtl.Finalised eq "N"
            End_Procedure
        End_Object 
     
       Set Main_DD to oSched_DD
       Set Server  to oSched_DD
    
     
       Object oWebMainPanel is a cWebPanel
            Set piColumnCount to 50
            
            // other cWebForm's here...
     
           Object oHistory is a cWebCheckbox
                Set piColumnSpan to 3
                Set psCaption to "Show History"
                Set piColumnIndex to 47
                Set psChecked to "Y"
                Set psUnchecked to "N"
                Set psValue to "N"
                Set pbServerOnChange to True
                
                Procedure OnChange String sNewValue String sOldValue
                    Boolean bChecked
                    Forward Send OnChange sNewValue sOldValue
                    Get GetChecked of oHistory to bChecked
                    If (bChecked = True) WebSet pbActiveJobs of oPDOWorksheet to False
                    Else WebSet pbActiveJobs of oPDOWorksheet to True
                    Send RebuildAllConstraints of oScheddtl_DD
                    Send RefreshListFromDD of oDetailGrid
                End_Procedure
            End_Object
            
            // cWebGrid here...
            // A lot of cWebColumn type objects here...
            // End_object of cWebGrid
        End_Object
    End_Object
    Last edited by Rachael; 14-Jul-2019 at 10:29 AM.
    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
  •