Simplicty and flexibility!


Function::Internal

ExecDerivation
ExecDerviation("MyDerivation")
ExecDerivation("RecordSave()+FormClose()")
ExecDerivation(Lookup MyDerivations ADerivation)
ExecDerivation(GetVar("CloseButtonDerivation"))


One of the main tasks in 8.x has been to open up DataEase programming. Since the beginning of DataEase has derivations, scripts, DQL's etc been "non changeable" i.e. they will only exist in the form designed by the developer when designing the applicaiton.

In DE8 we want to make programming flexible, so that an application could evolve outside its fixed design.

The first part we attacked was DQL with ExecDQL which opened DataEase wide open, but for some strange reason it took us a while to realise that it would be very neat if we could simply fire a Derivation on the go too.

ExecDerivation is basically the same as the derivation on a Field/Column or the Action: Execute Derivation/Function but with one significant difference...

It will interpret a string and execute it on the fly.

This means that you can now very easily change the action on a button based on things that happen in your application.

For instance you can have this derivation on all your close buttons.

ExecDerivation(GetVar("CloseAction"))

Then you can add the following to the OpenDocument action on your forms.

+SetVar("CloseAction","DocumentOpen(/'DocumentToReturnToHere/')+DocumentClose()")

Use your imagination...

Parameters


Derivation: Any allowable derivation according to the rules of BRL in DataEase.

Returns/Result


Result: Result of derivation executed. Derivation 1+1 will hence return 2.

Examples


Reference

See Also


On the forum about ExecDerivation

On the blog about ExecDerivation

DataEase 8.5RC1 - ExecDerivation() - New Function/New Sample (Ver. 8.5.0.2032)

Download Sample! We had to delay release of 8.5RC1 with 24 hours due to a late discovery of problems related to language support outside English speaking countr...

Product: Dataease [{8}]FIVE. Written by DataEase 03/12/15 at 00:24:11


dg3_HelpView