COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: joseph123 on 30 Jan 2018 10:10:38 PM

Title: Cognos 11.0.7 CustomControl JavaScript to remove top 2 lines from value prompt
Post by: joseph123 on 30 Jan 2018 10:10:38 PM
Hi

Does any one has JavScript code to remove top 2 lines from value prompt.
Does any one knows method and syntax to remove a line.
Title: Re: Cognos 11.0.7 CustomControl JavaScript to remove top 2 lines from value prompt
Post by: tkjenkin on 05 Feb 2018 02:49:13 PM
<script language="javascript">
var f = getFormWarpRequest();
var list = f._oLstChoicesplaceyourpromptnamehere;

list.remove(0);
document.formWarpRequest._oLstChoicesplaceyourpromptnamehere[0].text =  '  ';
list.removeAttribute("hasLabel");
</script>

===============================

Notes:  replace placeyourpromptnamehere with your prompt name
in the two places.