FR

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

by Torsten Haase
Posted on Thu, 10/22/2020 - 16:38

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

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • MS
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock