James,
I use the same system Javier described. The basic idea came from the newsgroup. 
We make PDFs of every report. All report systems have a list of the same 
variables with values specific for each report. The PDF writing code (about a 
100 lines and three calls to other screens) uses those variables to create the 
report, print the PDF, and save the info. It’s used in about 50 screens but 
there is only one set of code to edit.  If it works in an EEP it works here.

RUN SELECT CmdCode FROM RMDInfo WHERE CmdName = 'PrintPDF'

RMDInfo is:
CmdName Text 25  - Name that is called
CmdUse Text 80  - What the code does, so I remember it
CmdCode Varchar – Code itself
CmdDate  DateTime – When it was added/changed
Cmdwriter Text 28  - Who did it.

Started doing the same thing anywhere identical code is used multiple times or 
complicated/long code only gets called occassionally.

Tom Frederick
President/CEO
Elm City Center
1314 W Walnut
Jacksonville, IL 62650
O-217-245-9504
F-217-245-2350
[email protected]<mailto:[email protected]>

From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia
Sent: Thursday, May 28, 2015 1:10 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Forms: Custon Form Action

James,

You can call a Custom from action only from within the form where it is 
defined. However, there are ways where you can store the code you want and call 
from anywhere you want.
For example. I have a set of Administrative tasks that I like to run from 
within many forms and thus I created a table where I store the code and then I 
called as needed. The table structure is as follows:

   Table: IntCmd
   Descr: Table to Store Internal Commands for EEPs

No. Column Name        Attributes
--- ------------------ ------------------------------------------------------
   1 CmdName            Type   : TEXT 18 NOT NULL
                        Consrnt: PRIMARY KEY
   2 CmdData            Type   : LONG VARCHAR NOT NULL
   Current number of rows:         9

I have currently 9 universal command stored. I assign a name to the code and 
store it in the CmdName column and store the actual code in the CmdData column, 
then I can call that code from anywhere using the command

RUN SELECT CmdData FROM IntCmd WHERE CmdName = 'RemoteAdmin'

In this case the name of the code I want to run is “RemoteAdmin” minus the 
quotes of course. It work very well and I believe it is what you are looking 
for.

Javier,

Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137

From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On 
Behalf Of James Bentley
Sent: Thursday, May 28, 2015 11:16 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Forms: Custon Form Action

Within a form you can define eeps for the following events:
 * On Before Start EEP
 * On After Start EEP
 * On Before Design Action
 * On Close Designer Action


my question is if I have defined a Custom Form Action
Say "DefFormVariables"



Are there restrictions on when I can use
 PROPERTY RBASE_FORM_ACTION DefFormVariables ' '


I have several forms that require extensive

SET VARIABLE statements.

I would like to consolidate them into a Form Custom Action
and call them in then above mentioned EEPs. I can not find
in the Help Documentation a mention of restrictions on using a
PROPERTY RBASE_FORM_ACTION command.

Any help would be appreciated.



Jim Bentley,
American Celiac Society
1-504-737-3293

Reply via email to