Hi all,
Not sure if this has been covered but I can't seem to find the information anywhere.
I'd like to restrict the triggering of an event driven macro (creation of model) to only one specific database on the server.
Other than specifying in the report that is being triggered which database it should run the code on (which I'm already doing), is there any other way of doing this?
Ideally we don't want the macro to trigger at all unless you are creating a new model on a specific database only.
Many thanks,
Fran
Hi Fran,
Macros are always defined database-independently. To restrict the execution of a (event-triggered) macro, you will have to check the database name inside the macro code:
Context.getLoginInfo( Context.getSelectedModels()[0] ).getDatabaseName()
Please keep in mind, that in this case, you have a user-defined macro, which cannot be used to handle ConnectDesigner events. It is only suitable to be run in Architect.
BR, Torsten