Re: HELP: Problem in Forms30

From: <scancm_at_biobase.dk>
Date: 20 Oct 1998 08:00:06 GMT
Message-ID: <70hfu6$rka$1_at_news.net.uni-c.dk>


Rui Anastácio <ranastacio_at_mail.telepac.pt> wrote:

: Hello !

: I need to pass some data to a form when the form is called from a menu.
: I have a form that I want to call from 2 menu options, but the form should
: perform diferently on each call. So I have to pass some parameter to the
: form
: when 'runform' runs.

: I could pass the data trough a UNIX ENVIRONMENT VARIABLE. The menu item
: command
: line could be something like
: set DATA='102'; iap -c ... formname ...

In this case I would use a global variable.

As documented in the Sql*Menu reference (9-6) Sql*Forms global variables are available from Sql*Menu if menu and forms are inetgrated. In that case I would create a forms procedure where I could assign a value to a variable, e.g. :global.data := <some value> depending on a parameter to the procedure and afterwards launch the form. The items for the 2 menu options would then be a call of this procedure with different arguments, e.g. my_proc('102').

If menu and forms are not integrated I would create 2 different wrapper forms containing a dummy control block with a single dummy control field for the cursor and a KEY-STARTUP trigger where you may define your global value and afterwards launch the form in question with NEW_FORM. The items for the 2 menu options would be these 2 wrapper forms.

: but can I get the value of these variable inside the form ?

: Thanks for any help
: Rui Anastacio (ranastacio_at_mail.telepac.pt)

Regards

-- 
Christian Mondrup, Computer Programmer
Scandiatransplant, Skejby Hospital, University Hospital of Aarhus
Brendstrupgaardsvej, DK 8200 Aarhus N, Denmark
Phone: +45 89 49 53 01, Telefax: +45 89 49 60 07
Received on Tue Oct 20 1998 - 10:00:06 CEST

Original text of this message