Dear all,

I want to run my own custom procedure before the Query On Initialize in datasource creation screen. Kindly, tell me how I can do it.



asked 08 Apr '14, 12:06

grajan777's gravatar image

accept rate: 10%

edited 08 Apr '14, 14:46

Hi George,

The pre-query event triggers every time the datasource is queried, just before the execution. I guess you want to run your custom procedure only once, just before the first execution of the datasource. If so, you can define a flag and check it in the pre-query event.

Best Regards,


answered 08 Apr '14, 14:27

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
accept rate: 25%

Hi Ibrahim,

Ya, I tried that. Unfortunately I am not able get the name of the datasource that is invoking the pre-query. I need to know the datasource in pre-query so that I can make my procedure generic. Otherwise I will need to write as many pre-query procedures as there are datasources in my system.

Can you kindly help me with the right API for getting the datasource name that is invoking the pre-query?


(08 Apr '14, 14:45) grajan777

Hi George,

You can use api_application.getEvent().objectName_tx to get the name of the datasource that is invoking the pre-query.


(08 Apr '14, 15:19) Ibrahim Sand... ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 08 Apr '14, 12:06

Seen: 1,705 times

Last updated: 08 Apr '14, 15:19

© Copyright Gerger 2017