How to run automatic procedures


#1

Could someone direct me to where I can learn where to put a .newprocedure so it runs when I click on a field. I have no problem running a new procedure from the Action Menu.

I looked at Field Properties down where it says Formula and Code, but nothing happens if I drop a procedure in there, ie. something like (.changedate)

Is there a free video or somewhere else I can look, since the documentation isn’t quite there yet?

Thanks.


#2

Are you working in the Data Sheet or working on a form? I don’t know of a training video on this topic, but if you have a Text Editor object on a form then you can put the code in the procedure pane for the Text Editor when you are in Graphics Mode. You can also set what action will trigger the procedure in the Text Editor Options Pane. So you could, for example, set Procedure Trigger to “Start Editing.” Then, when you click on the field, it will execute the code you put in the procedure pane. If you do that and go back to Data mode, then click on your text editor and it will run the code. So that would seem to be doing what you inquired about, if you are working in a form.
I am not sure what you mean about dropping a procedure in there. If you are just putting the name of a procedure there, nothing will happen. You could, however, put the code Call .newprocedure, and it would run the .newprocedure code when it is triggered. One of the beauties of PanX is that you can put the code right there and avoid the long lists of procedures, many of which only contain a few lines.


#3

Thanks for your help. The “Call” was the solution.