Passing Parameters to a Morfik Form

It is useful to be able to pass parameters to a form when, for instance, you want to click on a record displayed in a continuous form and open another form to display its details. For data aware forms this is not a problem since the parameters of the query that the form is bound to can be easily set via the third parameter of the OpenForm function as outlined in a previous post to this blog. For non-data aware forms it is a bit more complicated, but not much.

To pass an arbitrary, user defined parameter to a form first you have to create the parameter. You do this by right clicking the form and selecting ‘Parameters’. Simply enter the information for the new parameter into the grid.

To access the value of the parameter just refer to the parameter as though it were a locally defined, string variable. Suppose you created a parameter named ‘CallNumber’. To access its value, just do this:

variable := CallNumber.

There is a good article in the Morfik Wiki here:

http://www.morfikwiki.com/Form_parameter

Leave a Reply