-
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
[/CODE]
Edgar
-
Re: OnConstrain on Web
Because piNivel isn't a Web Property perhaps?
Mike
-
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
-
Re: OnConstrain on Web
Process pooling edgar.
Process pooling safe code.
You cant use regular properties like that in a web application
-
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
-
1 Attachment(s)
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
[/CODE]
Edgar
-
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.
-
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
[/CODE]
Edgar
-
Re: OnConstrain on Web
Please, Go back and read the docs again ...
{Webproperty = [B]True}[/B] is old , and should not be used anymore.. either set it as a client, server or ServerSession scope web-property.
[url]https://docs.dataaccess.com/dataflexhelp/#t=mergedProjects%2FDevelopmentGuide%2FWeb_Properties.htm[/url]
your case, a server or serverSession would be enough, as you dont need this property to be sent to the client browser..
-
1 Attachment(s)
Re: OnConstrain on Web
Hi Samuel:
[CODE]
Object oCocodigo is a cWebView
{ WebProperty= ServerSession }
Property Integer piNivel 8
[/CODE]
new error
Edgar