cancel
Showing results for 
Search instead for 
Did you mean: 

How To Catch .Dateinfo() On Variable Initialization ?

former_member197738
Participant
0 Kudos

Hello Folks,

I am trying to by-pass Mandatory Bex Prompts.

I dont want the hard-coded date to be pass from Global Script Variables and calling it at variable Ini..event for a simple reason, that date will be a passed date if i run the dashboard anytime after the given hard-coded date.

Challenge ?

Application.getinfo(date);

is not available On Variable Initialization EVENT.

Some thoughts?

Do you think it would be a good idea to pass hard-coded 10 to 11 months or some years in advance ? Design Studio will not return any record and will only retrieve latest and great data available

Appreciate your suggestion and recommendation like always.

Accepted Solutions (1)

Accepted Solutions (1)

Martin-Pankraz
Active Contributor
0 Kudos

Hi Mohd,

In addition to Tammy's suggestion you could also try coming up with a logic on the query exit. For example using a moving range starting at a particular date depending on today etc which is evaluated on the backend during runtime dynamically.

Another line of thought would be loading the query in scripting so that you have all Design Studio scripting methods available.

For example in event On Startup: DS_1.loadDataSource(); DS_1.setVariableValueExt("variable_name", "value");

Kind regards

Martin

former_member197738
Participant
0 Kudos

Hi Martin,

Perhaps the Terminology difference, when you say "Query Exist" is it same as " Exit Variable in bex?. If yes then yes we did that and it worked as expected.

We are on 1.4 so don't have the privilege to target specific data source. SO I'm left with just Application.setVariable... 🙂

Thanks for your response folks

Happy Holidays!!

Martin-Pankraz
Active Contributor
0 Kudos

Hi Mohd,

Yes, that is what I meant in the end. Good to know that this worked out for you. I would stringly recommend to update eventually.

Happy Holidays to you too and please flag correct answers.

Kind regards

Martin

Answers (3)

Answers (3)

former_member265529
Contributor

Hi Mohd,

If the variable needs to be Mandatory, you can set default value for the variable in BW.

You can always set current date as default value to the variable, So you don't have to pass it in dashboard.

Thanks,

Poovarasan

former_member197738
Participant
0 Kudos

Hi Poovarasan,

We created exit variable and it fixed the issue. Thanks for your response.

former_member197738
Participant
0 Kudos

thanks everyone for your sugestions

TammyPowlas
Active Contributor
0 Kudos

The easiest way is to make the mandatory BEx prompts optional in the BEx query - is that an option for you?

former_member197738
Participant
0 Kudos

Hi Tammy,

Yes we can set as Optional but date parameter must be passed with some value.