cancel
Showing results for 
Search instead for 
Did you mean: 

Get current web item property value in Javascrpt currentState.getParameter

Former Member
0 Kudos

Hello Experts,

I am using BI 7.1. In the WAD I am using the new feature from EHP1 to add a custom item to the contet menu. I have it working well. However, I would like to make it more dynamic. I have added options to the context menu to allow the user to "Display Repeated Text" or "Hide Repeated Text". This was accomplished with 2 Script Items. However, this creates 2 items in the context menu. I would like to make it one dynamic menu item.

My idea is to get the current value of the ANALYSIS_ITEM parameter REPEATED_TEXTS_DISPLAYED inside the Javascript code. If the current value is "X" I will switch it to " ". If it is currently blank, I would switch it to "X". Then I will be able to have just ONE context menu entry that toggles between the states.

I see there is a command currentState.getParameter that SAP provides but I cannot get the syntax to work. Does anyone have any sample code that uses this command?

Also, once I get the current value, what is the syntax to do the IF/ELSE logic in Javascript? (If value = X .... Else....).

Thanks for help!!!

Jose

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hey,

if else logic/Syntax is stated below :



if (currentState.getParameter(param1) == "X" )
{
your logic here..;
}
else
{
your logic here..;
}

but i am not sure about currentState.getParameter function i will update you when i get some more info about this..

waiting for your feedback

Regards

Nitin Bhatia

Edited by: Nitin Bhatia on Apr 12, 2010 1:19 PM

Edited by: Nitin Bhatia on Apr 12, 2010 1:20 PM