Re: designer 6i web application - parameter problem

From: jhking <jhking_at_airmail.net>
Date: Wed, 09 Jul 2003 21:43:41 -0500
Message-ID: <beijs1$n5l_at_library1.airnews.net>


Darek.
I'm assuming that making the element queryable and letting the user fill it in doesn't work for you. What you can do is go to table usages, right-click on your base table and when the property sheet comes up, go to the where tab.
If you need client id like you said in your other post you could just type: client_id = wsgl.getclientid

and Designer will integrate that into your where clause. If, on the other hand, you need some variable value in the where clause its a little more involved but doable.

Under the events tab under application logic in the module component right click and add a 'public declarations' event. In your public declarations event declare your variable. Lets say we need a date.

g_mydate date ;

Close that, right click on events again and this time pick pre-query. Pre-query runs after the user has hit the find button on the query form but before the sql has been executed. In there, type:

g_mydate := sysdate - 3 ;

-- or however you can determine your variable's value.  You could
-- call a procedure or function here to put whatever value you needed
-- in g_mydate

When the module is compiled and run g_mydate will be populated in the prequery event and then the sql (with g_mydate populated will be executed).

>>>Darek wrote:
>>>
>>>
>>>>Hi
>>>>My task is to create web application using Designer 6i (Web pl/sql),
>>>>and
>>>>I have a problem.
>>>>I need to use the condition in base table usage (using some parameter
>>>>In WHERE clause)
>>>>to limit the result
>>>>I cannot assign parameter's value. In forms I used something like
>>>>that:
>>>>:PARAMETER.parameter_name := 'whatever'
>>>>
>>>>In web/plsql I cannot do that, because I get an error (It just doesn't
>>>>work).
>>>>Any help or any other solution about applaying condition in base table
>>>>usage using parameter
>>>>would be appreciated.
>>>>
>>>>Thanks
>>>>Darek
Received on Thu Jul 10 2003 - 04:43:41 CEST

Original text of this message