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.

Regards.

George

asked 08 Apr '14, 12:06

grajan777's gravatar image

grajan777
1011230
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,
Ibrahim

link

answered 08 Apr '14, 14:27

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
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?

George.

(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.

Regards,
Ibrahim

(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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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

Tags:

×12
×2

Asked: 08 Apr '14, 12:06

Seen: 882 times

Last updated: 08 Apr '14, 15:19


© Copyright Gerger 2017