Remove prompt title with javascript

It seems that most people find this blog looking for a way to remove the title from a value prompt. So, in an attempt not to disappoint, here it is.

For 8.3+
Name your value prompt, Month for example. Immediately following the prompt add the following HTML item:
var form = getFormWarpRequest();
var MonthList = form._oLstChoicesMonth;
MonthList.remove(0);
MonthList.remove(0);
MonthList.removeAttribute(“hasLabel”);

As this is using underlying Cognos javascript functions it may not be supported in an upgrade. The removeAttribute(“hasLabel”) is important to remember. Normally the value prompt has two rows at the beginning that have no data. The hasLabel attribute tells Cognos not to return a value when either of those two rows are selected.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: