Jump to content
Server Maintenance This Week. ×

Replacement for EventScript plugin in FMPro 11


This topic is 4819 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi Everybody,

I built a database for my patients a while ago on FM Pro 7.

One of the fields on the main table was "Referred by" which recorded whether the patient was referred by a doctor, another patient or someone else (i.e. the milkman...).

In order to achieve this the best way I found at the time was to use a free plugin called eventscript and fill the "referred by" field using a calculation

If(Referred by type="Doctor";

S4HU_EventScript(Get(FileName); "Referred by doctor";"");

If(Referred by type="Other patient";

S4HU_EventScript(Get(FileName);"Referred by patient";"");

If(Referred by type="Other";

S4HU_EventScript(Get(FileName);"Referred by other";"");

"")))

The three scripts used where:

Referred by doctor:

Freeze Window

Go to Layout ["Record 1 - Personal Data (Doctors) (Patients)]

Go to Field [Patients::Referred by]

Referred by patient:

Freeze Window

Go to Layout ["Record 1 - Personal Data (Patients)" (Patients)]

Go to Field [Patients::Referred by]

Referred by other:

Freeze Window

Go to Layout ["Record 1 - Personal Data (Other)" (Patients)]

Go to Field [Patients::Referred by]

So, basically, I created another field called "referred by type" and triggered a change in layouts depending on the values of this field, so as to be able to draw data from three different tables to the "referred by" field. If the selection on the first field was "doctor" then the relevant layout was used, where values from the "doctors" table where used and so on.

I am now trying to port my database to FM Pro 11 and use the build in script triggers. How can I get the same functionality using the script triggers on FM Pro 11?

Many thanks for any help offered

Link to comment
Share on other sites

This topic is 4819 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.