Re: developer 2000 call form passing variable

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au.no_junk_email>
Date: Fri, 25 Feb 2000 13:33:56 +1100
Message-ID: <894pm1$797$1_at_gossamer.itmel.bhp.com.au>


Sharma,

You don't actually say what your problem is - The Form does not execute your query at all, or you want the query to be restricted by projno, or is the Form reporting an error?

Looking at your code, you are setting and retrieving the globals OK, so my guess is that you are trying to make the query restrict on 'projno'. If so, you need to load :project.projno in a Pre-Query trigger, since at the time of When-New-Form-Instance the form is in normal mode.

By the way, if there is any chance that Form B can be called without the global being created then you will get a run-time error trying to read a non-existent global. Use Default_Value prior to retrieving the global.

ssharma24_at_my-deja.com wrote in message <893m34$tos$1_at_nnrp1.deja.com>...
>I am having a problem passing a global variable in call forms:
>
>Form A is calling Form B:
>When button Pressed trigger in Form A:
>:global.directory := 'y';
>:global.projno := :Blockname.projno;
>
>CALL_FORM ('form b', no_hide, no_replace, query_only);
>
>When new form instance in form B:
>BEGIN
>
> IF (:global.directory = 'y') THEN
> :project.projno := :global.projno;
> EXECUTE_QUERY;
>else
>SET_WINDOW_PROPERTY ('PROJ_FILE_WINDOW', WINDOW_STATE, MAXIMIZE);
>DEFAULT_VALUE (NULL, 'GLOBAL.FILETYPE');
>
>
>END IF;
>:global.directory := null;
>:global.projno := null;
>
>EXCEPTION
>
> WHEN others THEN
>
> MESSAGE (sqlerrm);
> MESSAGE (' ', NO_ACKNOWLEDGE);
> RAISE form_trigger_failure;
>
>END;
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Fri Feb 25 2000 - 03:33:56 CET

Original text of this message