Re: Forms4.5 questions (passing parms betw/ forms & problem w/ select statements)

From: Steve Hauser <shauser_at_wat.hookup.net>
Date: 1995/12/30
Message-ID: <4c2ijm$bot_at_nic.wat.hookup.net>#1/1


powell_at_clemson.edu (Janice Powell) wrote:

>I have 2 Forms4.5 questions.
 

>1) I have an application that consists of 2 forms (formA and formB).
>FormA is initially executed and depending on which option is chosen, a
>"call_form" statement is issued for FormB. When I execute the
>call_form, I pass some parameters over to FormB and that works great.
>My question now is how do I pass parameters back to FormA when I exit
>FormB?

Use globals, since they are persistent across all forms running in that runform. Unfortunately all globals are varchars, so you may have to do some conversion.

>2) I seem to be having a bit of difficulty using block items in the
>where clause of SELECT statements. For ex., I have an Order block that
>contains the item -- stock_num. I want to do a select statement to
>find all customers that purchased products where the stock number =
>'040'.
>If I execute the following statement
>select * from customer where customer.stock_num = :order.stock_num;
>I get no rows selected. But when I display the value of
>:order.stock_num it = '040' just as I expected it to.
>Then execute the following statement:
>select * from customer where customer.stock_num = '040';
>And I get the rows I expected. I'm puzzled, though, as to why I'm not
>getting anything when I use :order.stock_num in the 'where clause' of
>the select statement. Has anyone ever had this experience?

Perhaps the trigger containing the select is being fired before the Order block is queried. In that case the :Order.stock_num would be null and nothing would be returned. Try displaying the Order.Stock_num value from the same trigger that contains the select. If this proves the case, either move your execute_query for the Order block or the select statement to other triggers so that the Order block is populated before the other select executes.

Hope that helps...


Steve Hauser,        \  CGI Group            \  Business Solutions  
Partner, Consultant   \  33 Yonge St          \  Through Information
                       \  Toronto, ON, Canada  \  Technology        
shauser_at_wat.hookup.net  \  M5E-1G4              \                   
Received on Sat Dec 30 1995 - 00:00:00 CET

Original text of this message