Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: OnConstrain on Web

  1. #1
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default OnConstrain on Web

    Hi all

    Why does this filter work on WINDOWS and not on WEB?


    Code:
      Object oConmayor_DD is a cConmayorDataDictionary
              Set pbUseDDSQLFilters to True
              Procedure OnConstrain 
                    String sFiltro 
                    Integer nivl
                    Get piNivel to nivl
                    Move (SFormat("CONMAYOR.Nivel<=%1 ",SQLString(nivl))) to sFiltro  
                    Set psSQLFilter to  sFiltro 
              End_Procedure
        End_Object
    
    //Called on WEB
    
     Procedure OnChange String sNewValue String sOldValue
                            Forward Send OnChange sNewValue sOldValue     
                             Set piNivel to sNewValue  
                             Send Rebuild_Constraints to oConmayor_DD        
                             Send GridRefresh of oWebCrearCodigos      
                             Send Find of oConmayor_DD FIRST_RECORD 1
     End_Procedure

    Edgar

  2. #2
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: OnConstrain on Web

    Because piNivel isn't a Web Property perhaps?

    Mike

  3. #3
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default Re: OnConstrain on Web

    Hi all

    When removing the OnConstrain procedure, it works fine and loads the information.
    Until 20 days ago it worked fine. Today I go back to work and he doesn't. I already checked filters and I see everything ok.

    Edgar

  4. #4
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,445

    Default Re: OnConstrain on Web

    Process pooling edgar.

    Process pooling safe code.

    You cant use regular properties like that in a web application
    Samuel Pizarro

  5. #5
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default Re: OnConstrain on Web

    hi all

    I give up, I have tried defining the property as
    {WebProperty = True}
    Property Integer pi Level 8
    and nothing


    How do you make a dynamic filter on the web?
    anyone have some code?


    Edgar

  6. #6
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default Re: OnConstrain on Web

    Why does this message appear?

    Code:
     Object oConmayor_DD is a cConmayorWDataDictionary  
             Procedure OnConstrain
                Integer nivl        
                 WebGet piNivel to nivl
                Constrain CONMAYOR.Nivel le nivl
            End_Procedure
        End_Object
    Edgar
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Captura1.PNG 
Views:	76 
Size:	7.3 KB 
ID:	14058  

  7. #7
    Join Date
    Feb 2009
    Location
    Adelaide, South Australia
    Posts
    2,863

    Default Re: OnConstrain on Web

    Hi Edgar

    Sorry to be a little blunt but I reckon this is all in the documentation.
    We have all been through it in the beginning as the web is a little different that windows.

    Web properties must be of WebObjects, data dictionary is not. So create it at the view level and webget and webset it and all works.

    I can really recommend even with all you know already to run through the web order entry example and perhaps even the tutorial and you save yourself lots of future frustrations.

    Hope you understand my best intentions with this post.
    Marco Kuipers
    DataFlex Consultant
    28 IT Pty Ltd - DataFlex Specialist Consultancy
    DataFlex Channel Partner for Australia and Pacific region
    Adelaide, South Australia
    www.28it.com.au

  8. #8
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default Re: OnConstrain on Web

    Hi Marco:

    Don't worry, I understand your good intentions


    Code:
    Object oCocodigo is a cWebView      
        { WebProperty=True }  
         Property Integer piNivel  8
    Edgar

  9. #9
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,445

    Default Re: OnConstrain on Web

    Please, Go back and read the docs again ...

    {Webproperty = True} is old , and should not be used anymore.. either set it as a client, server or ServerSession scope web-property.

    https://docs.dataaccess.com/dataflex...Properties.htm

    your case, a server or serverSession would be enough, as you dont need this property to be sent to the client browser..
    Samuel Pizarro

  10. #10
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2,508

    Default Re: OnConstrain on Web

    Hi Samuel:

    Code:
    Object oCocodigo is a cWebView      
       { WebProperty= ServerSession } 
         Property Integer piNivel  8
    new error

    Edgar
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Captura1.PNG 
Views:	57 
Size:	22.2 KB 
ID:	14062  

Page 1 of 3 123 LastLast

Posting Permissions

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