Re: Calling form in other directory (SQL*Forms 2.3)

From: Simon Rivett <simonr_at_g2syd.genasys.com.au>
Date: Mon, 26 Jul 1993 02:44:24 GMT
Message-ID: <1993Jul26.024424.18512_at_g2syd.genasys.com.au>


In article <CAIvDE.FoB_at_brunel.ac.uk> cs91dnm_at_brunel.ac.uk (David N McCann) writes:
>Hi,
> Just a brief not to all those of you who sent me ideas to solve my
>problem. The answer is quite simple (if a little annonying)
>
>to CALL /home/fred/formname
>
>you have to put the form's name in a variable (or a hidden field) and then do
>this :-
>
>CALL &Global.formname
>
>(assuming you put '/home/fred/formname' into GLOBAL.formname

I have done a similar thing in a menu system I wrote, but extended it to support a $FORMPATH environment variable (a la $PATH, $CDPATH, etc). The menu would read to name of the form to be executed from the menu table, and provided it did not have an absolute pathname (start with "/"), would try to CALL or CALLQRY the form prepending the various elements of FORMPATH, until the form ran.

The hitch with this is that it works OK only with programs called off the menu, and not forms called from application forms (some which I did not write). Although the .inp code which parses FORMPATH can be copied to other forms, this can become unmaintainable (unless it works flawlessly) and messy to implement.

A simpler (and faster) solution was to symbolically link all forms in other forms directories into the one directory, from where you would start iap. That ensured the customer's applications forms could be found, and my custom forms would execute also.

Simon.

---
Simon Rivett - Genasys II, Lev 13, 33 Berry St, North Sydney, NSW, Australia
Tel: +61-2-954-0022 (-9930 FAX); Internet: simonr_at_g2syd.genasys.com.au

              The following .sig is surrounded by an SEP field
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.                                                                           .
.                                                                           .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                              See? It works.
Received on Mon Jul 26 1993 - 04:44:24 CEST

Original text of this message