Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Visual Discovery Problem
Go
New
Search
Notify
Tools
Reply
  
Visual Discovery Problem
 Login/Join
 
Member
posted
This is my first time posting to the this Forum.
I have a Visual Discovery question or problem. I'm trying to pass variables from a focexec to a Visual Discovery page so that I can limit what is displayed based on the person running the request. For some reason the code will not restrict the data and is showing all records and not filtering out any. Below is the code that I'm executing. The variables are passed in the function window_onload(). Any assistance would be greatly appreciated. Thanks

< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<script id=IBI_OptionsScript type=text/javascript>
var rltVersion = "714";
var cgipath = "cgipath";
var ibirls = "ibirls2";
var multidrill = "multidrill";
var mntFormValidate = "mntFormValidate";
var dyncalendar = "dyncalendar";
var olap="olap";
var olappanebase="olappanebase";
var ibixmltree="ibixmltree";
var ibilangtrans="ibilangtrans";
var olapdrill="olapdrill";
var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,ibilangtrans,dyncalendar,olap,olappanebase,olapdrill,multidrill);
</SCRIPT>

<script id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<script id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<script id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);</SCRIPT>

<script id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
<TITLE>HtmlPage
</TITLE>
<script language=JavaScript src="/ibi_html/visdis/VzScripts/VzDataQuery.js"> </SCRIPT>

<script language=JavaScript src="/ibi_html/visdis/VzScripts/VzEnumAccess.js"> </SCRIPT>

<script id=clientEventHandlersJS type=text/javascript>
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
	// SET USER VARIABLES

	var usrLevel = document.all.APPLEVEL.value;
	var usrName = document.all.USRNAME.value;
	var areaID  = document.all.AREAID.value;
    var pseq    = document.all.PSEQ.value;
 	if(usrLevel=='TOM'){
			fld = 'Ops Mgr';
			fldValue = usrName;
          	a1Data = "bmp001 Ops~ Tech Rpt~ Status State Ticket~ Status Ticket~ Source Ticket~ Type Mnths~ Open Days~ Open Action~ Required";
    } else {
		if(usrLevel=='DTO'){
			fld = 'Ops Mgr';
			fldValue = usrName;
            alert(2);
            return;
  			a1Data = "bmp001 Ops~ Mgr Ops~ Tech Rpt~ Status State Ticket~ Status Ticket~ Source Ticket~ Type Mnths~ Open Days~ Open Action~ Required";
		} else {
	         if(usrLevel=='HQ'){
				fld = 'Area';
				fldValue = areaID;
            alert(3);
            return;
				a1Data = "bmp001 Ops~ Mgr Ops~ Tech Rpt~ Status State Ticket~ Status Ticket~ Source Ticket~ Type Mnths~ Open Days~ Open Action~ Required";
			} else {
				fld = 'NONE';
				a1Data = "bmp001 Area Ops~ Mgr Ops~ Tech Rpt~ Status State Ticket~ Status Ticket~ Source Ticket~ Type Mnths~ Open Days~ Open Action~ Required";
		}
	}
}
	if (fld != 'NONE') {
		activex2.Command(2015, "" + fld + "", 0, 0)
		activex2.Command(2010, "" + fldValue + "", 0 ,0x0040)
	    activex1.Command(7111, "", 0, 0)  //*** Exclude Undelected
	    activex2.Command(7111, "", 0, 0)  //*** Exclude Undelected
	activex1.Data = a1Data;
	}

	activex1.Data = a1Data;


}


function restoreExcluded(){
	activex1.RestoreDeleted()
	activex1.SelectAll()
	activex2.RestoreDeleted()
	activex2.SelectAll()
}
function restoreOrigData(){
		activex2.Command(2015, "" + fld + "", 0, 0)
		activex2.Command(2010, "" + fldValue + "", 0 ,0x0040)
	    activex1.Command(7112, "", 0, 0)  //*** Exclude Undelected
	    activex2.Command(7112, "", 0, 0)  //*** Exclude Undelected
}

function excludeData() {
    activex1.Command(7111, "", 0, 0)  //*** Exclude Undelected
    activex2.Command(7111, "", 0, 0)  //*** Exclude Undelected
}

function undoData() {
    activex1.Command(7118, "", 0, 0)  //*** Exclude Undelected
    activex2.Command(7118, "", 0, 0)  //*** Exclude Undelected
}
function gotoApplication() {
	constTable = "bpm001";
	constField = "Ticket";

    var dq = new VzDataQuery();
    var en = new VzEnumAccess();
	var selectedItems = dq.SelectedCount(constTable);

	if(selectedItems < 1 ) {
		alert("Search option not available at this time.");
        //alert("Please select a ticket");
		return;
	}

	if (selectedItems > 1) {
		//alert("Please only select one ticket.");
	    alert("Search option not available at this time")
		return;
	}

	// get the selected item ("4" => selected)
	var enumerator = en.Data(constTable, constField, 4, 1);

    //var url = "http://www.ccisites.com/" + enumerator[0];
    var url = "http://www.ccisites.com/"
	// show the report in a window
	window.open(url, "BPM Window");

}

function openExcel(){

	var tmpString = '';
	var objDataQuery 	= new VzDataQuery();
	var objEnumAccess	= new VzEnumAccess();
	var arrValues = new Array();
    var fld_array = new Array();
	var strValue 		= '';
	var tmpValue 		= '';
	var intCtr 	 		= 0;
	var intTotalRows 	= objDataQuery.RowCount('bmp003');
 	var fld_array       = objEnumAccess.Fields("bmp003");

	var excel = null;
	try
		{

			if(excel == null)
			{
			 excel = new ActiveXObject("Excel.Application");
			}
			var workbook = excel.Workbooks.Add();

			workbook.Activate();
			var worksheet = workbook.Worksheets("Sheet1");
			worksheet.Activate();

			for(var f=1; f<fld_array.length; f++) {
				worksheet.Range(worksheet.Cells(1, f), worksheet.Cells(1, f)).value = fld_array[f]
				var arrValues = objEnumAccess.Data("bmp003", fld_array[f], 6, intTotalRows);
		        for (var x=0; x<arrValues.length; x++) {
					worksheet.Range(worksheet.Cells(x+2, f), worksheet.Cells(x+2, f)).value = arrValues[x]
				}

			}
			excel.visible=true;

		}catch(exception)
		{
			window.alert(exception);
		}

}



function ColorDropDown_onchange() {
	//var tblName = Toolbox.GLBS.tblname.value + " ";
	tblName = 'bmp003 ';
 	activex1.ColorBy = tblName;
 	activex2.ColorBy = tblName;

	if (Toolbox.ColorDropDown.value != "_none_") {
		activex1.ColorBy = tblName + ReplaceSpace(Toolbox.ColorDropDown.value);
		activex2.ColorBy = tblName + ReplaceSpace(Toolbox.ColorDropDown.value);
	}
}


</SCRIPT>

<script language=vbscript>
function ReplaceSpace(word)
 // ADVIZOR normally uses a space as a delimiter, so this function puts an
 // escape sequence in place (a tilde) in front of spaces in strings
 ReplaceSpace=Replace(word," ","~ ")
end function
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto">

<object CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331" id=licensemgrobj>

<PARAM NAME="LPKPath" VALUE="/ibi_html/visdis/VzLicense.lpk">
</OBJECT>
<INPUT type=hidden value=!IBI.AMP.NAME1; name=USRNAME>
<INPUT type=hidden value=!IBI.AMP.APPLEVEL; name=APPLEVEL>
<INPUT type=hidden value=!IBI.AMP.AREAID; name=AREAID>
<INPUT type=hidden value=!IBI.AMP.PSEQ; name=PSEQ>
<object id=licensemgrobj classid=clsid:5220cb21-c88d-11cf-b347-00aa00a28331>
</OBJECT>
<SPAN id=text2 style="FONT-WEIGHT: bold; FONT-SIZE: 14pt; Z-INDEX: 12; LEFT: 10px; WIDTH: 390px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 10px; HEIGHT: 22px" tabIndex=12>Ticket Detail
</SPAN>
<object id=licensemgrobj style="TOP: 70px" classid=clsid:5220cb21-c88d-11cf-b347-00aa00a28331>
</OBJECT>
<object id=activex1 style="Z-INDEX: 1; LEFT: 10px; WIDTH: 990px; POSITION: absolute; TOP: 50px; HEIGHT: 250px" tabIndex=1 height=250 width=990 classid=clsid:A3F2BA52-CB2C-11D1-8EF0-00805F8A1694 name=activex1>
<PARAM NAME="_cx" VALUE="26194">
<PARAM NAME="_cy" VALUE="6615">
<PARAM NAME="Files" VALUE="\\testusbirs1\visdis\bmp003.txt">
<PARAM NAME="Data" VALUE="bmp003 Area Ops~ Mgr Ops~ Tech Rpt~ Status State Ticket~ Status Ticket~ Source Ticket~ Type Mnths~ Open Days~ Open Action~ Required">
<PARAM NAME="NumericAs" VALUE="0">
<PARAM NAME="ParallelAxis" VALUE="0">
<PARAM NAME="ShowSelection" VALUE="-1">
<PARAM NAME="SameScale" VALUE="0">
<PARAM NAME="ColorBy" VALUE="bmp003 Days~ Open">
<PARAM NAME="ColorScale" VALUE="1">
<PARAM NAME="ToolTips" VALUE="-1">
<PARAM NAME="ShowStripLabels" VALUE="-1">
<PARAM NAME="ShowUnselectedAxis" VALUE="-1">
<PARAM NAME="DarkUnselectedAxis" VALUE="-1">
<PARAM NAME="BubbleSizeStyle" VALUE="0">
<PARAM NAME="ColumnWidths" VALUE="map Ops~ Tech 0.111111 Rpt~ Status 0.111111 State 0.111111 Ticket~ Status 0.111111 Ticket~ Source 0.111111 Ticket~ Type 0.111111 Mnths~ Open 0.111111 Days~ Open 0.111111 Action~ Required 0.111111">
<PARAM NAME="ColumnPlots" VALUE="map Ops~ Tech B Rpt~ Status B State B Ticket~ Status B Ticket~ Source B Ticket~ Type B Mnths~ Open B Days~ Open B Action~ Required B">
<PARAM NAME="ColumnSorts" VALUE="map Ops~ Tech FO Rpt~ Status FO State FO Ticket~ Status FO Ticket~ Source FO Ticket~ Type FO Mnths~ Open FO Days~ Open FO Action~ Required FO">
<PARAM NAME="BrowserComponent" VALUE="VzLibrary.BrowserTweak">
<PARAM NAME="BrowserScript" VALUE="">
<PARAM NAME="ShowMissing" VALUE="0">
<PARAM NAME="WeightBy" VALUE="">
<PARAM NAME="Average" VALUE="">
<PARAM NAME="CalcEquation" VALUE="">
<PARAM NAME="CalcOption" VALUE="0">
<PARAM NAME="ModifyWeightName" VALUE="0">
<PARAM NAME="VwLabelFont" VALUE="SanSerif-Arial-12">
</OBJECT>
<SPAN id=line1 style="FONT-SIZE: 1pt; Z-INDEX: 3; LEFT: 10px; WIDTH: 970px; POSITION: absolute; TOP: 360px; HEIGHT: 5px; BACKGROUND-COLOR: black" tabIndex=3 elementtype="5">
</SPAN>
<object id=activex2 style="Z-INDEX: 2; LEFT: 10px; WIDTH: 980px; POSITION: absolute; TOP: 370px; HEIGHT: 270px" tabIndex=2 height=270 width=980 classid=clsid:601CD7D3-7278-11D1-871D-00A02411D404 name=activex2>
<PARAM NAME="_cx" VALUE="25929">
<PARAM NAME="_cy" VALUE="7144">
<PARAM NAME="Files" VALUE="\\testusbirs1\visdis\bmp003.txt">
<PARAM NAME="Data" VALUE="bmp003 Ticket BUN Date~ Open Opened~ By Last~ Modified Last~ Modified~ By Est~ Max~ Amt Est~ Min~ Amt Est~ Repair~ Date Ticket~ Status Ops~ Mgr Area">
<PARAM NAME="ShowUnselected" VALUE="-1">
<PARAM NAME="LineMode" VALUE="0">
<PARAM NAME="SortBy" VALUE="">
<PARAM NAME="IndentText" VALUE="-1">
<PARAM NAME="ScaleMode" VALUE="-1">
<PARAM NAME="ToolTips" VALUE="-1">
<PARAM NAME="DisplayFocus" VALUE="-1">
<PARAM NAME="ColumnGutter" VALUE="3">
<PARAM NAME="ColorBy" VALUE="bmp003 Days~ Open">
<PARAM NAME="ColorScale" VALUE="1">
<PARAM NAME="ZoomYScale" VALUE="1">
<PARAM NAME="PanY" VALUE="0">
<PARAM NAME="ContinuousIndicate" VALUE="0">
<PARAM NAME="ColumnWidths" VALUE="map Ticket 0.0954987 BUN 0.0754744 Date~ Open 0.103199 Opened~ By 0.138627 Last~ Modified 0.0749703 Last~ Modified~ By 0.0897795 Est~ Max~ Amt 0.0622103 Est~ Min~ Amt 0.060529 Est~ Repair~ Date 0.0798649 Ticket~ Status 0.0868049 Ops~ Mgr 0.0975579 Area 0.0354839">
<PARAM NAME="BrowserComponent" VALUE="VzLibrary.BrowserTweak">
<PARAM NAME="BrowserScript" VALUE="">
<PARAM NAME="MissingLabel" VALUE="
<NULL>">
<PARAM NAME="VwLabelFont" VALUE="SanSerif-Arial-12">
</OBJECT>
<SPAN id=line2 style="FONT-SIZE: 1pt; Z-INDEX: 5; LEFT: 10px; WIDTH: 990px; POSITION: absolute; TOP: 40px; HEIGHT: 5px; BACKGROUND-COLOR: black" tabIndex=5 elementtype="5">
</SPAN>
<FORM id=Toolbox style="Z-INDEX: 4; LEFT: 20px; WIDTH: 40px; POSITION: absolute; TOP: 320px; HEIGHT: 30px">
<IMG id=gotoapp style="TOP: 70px" onclick=gotoApplication[) tabIndex=4 alt="Go to application." src="/ibi_html/gotoapp.JPG" border=0 name=Toolbox originalHeight="32" originalWidth="32" method="post" action="">
<IMG id=restore title="Restore Selection" style="Z-INDEX: 6; LEFT: 50px; WIDTH: 30px; POSITION: absolute; TOP: 0px; HEIGHT: 30px" onclick=window_onload[) tabIndex=6 height=20 alt="Restore Selection" src="/ibi_html/restore_normal.gif" width=20 border=0 name=image2 originalHeight="22" originalWidth="23">
<IMG id=exclude title="Isolate Data" style="Z-INDEX: 7; LEFT: 90px; WIDTH: 30px; POSITION: absolute; TOP: 0px; HEIGHT: 30px" onclick=excludeData[) tabIndex=7 height=20 alt="Isolate Data" src="/ibi_html/exclude_normal.gif" width=30 border=0 name=image3 originalHeight="22" originalWidth="23">
<SELECT id=ColorDropDown style="Z-INDEX: 8; LEFT: 180px; WIDTH: 150px; POSITION: absolute; TOP: 10px" tabIndex=8 onchange=ColorDropDown_onchange[) name=ColorDropDown operation="NONE">

<OPTION value="" selected displaytext>
</OPTION>
<OPTION value="Ticket Source" displaytext="Ticket Source">Ticket Source
</OPTION>
<OPTION value="Ticket Type" displaytext="Ticket Type">Ticket Type
</OPTION>
<OPTION value="Ticket Status" displaytext="Ticket Status">Ticket Status
</OPTION>
<OPTION value="State" displaytext="State">State
</OPTION>
<OPTION value="Ops Tech" displaytext="Ops Tech">Ops Tech
</OPTION>
</SELECT>
</FORM>
<SPAN id=text1 style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; Z-INDEX: 9; LEFT: 200px; WIDTH: 150px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 310px; HEIGHT: 20px" tabIndex=9>Color by:
</SPAN>
<IMG id=undo title="Undo selection" style="Z-INDEX: 10; LEFT: 150px; WIDTH: 40px; POSITION: absolute; TOP: 320px; HEIGHT: 30px" onclick=undoData[) tabIndex=10 height=30 alt="Undo Selection" src="/ibi_html/undo.JPG" width=40 border=0 name=image1 originalHeight="34" originalWidth="40">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=ora_mfd name=ibiapp_app ismre="1">
< !-- <IMG id=image4 style="Z-INDEX: 13; LEFT: 360px; WIDTH: 30px; POSITION: absolute; TOP: 320px; HEIGHT: 30px" onclick=openExcel[) tabIndex=13 src="/ibi_html/exl2k.JPG" border=0 name=image4>-->
<INPUT id=IBIMR_domain style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=operatio/operatio.htm name=IBIMR_domain>
<INPUT id=IBIMR_folder style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=#nocticketswa name=IBIMR_folder>
<INPUT id=ibif_ex style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=app/bpm_tick.htm name=ibif_ex>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=ora_mfd name=ibiapp_app ismre="1">
<INPUT id=ibic_server style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=TESTUSRS name=ibic_server>
<INPUT id=IBIMR_domain style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=operatio/operatio.htm name=IBIMR_domain>
<INPUT id=IBIMR_folder style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=#nocticketswa name=IBIMR_folder>
<INPUT id=ibif_ex style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=app/bpm_tick.htm name=ibif_ex>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=ora_mfd name=ibiapp_app ismre="1">
<INPUT id=ibic_server style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=TESTUSRS name=ibic_server>
</BODY>
</HTML>

This message has been edited. Last edited by: Kerry,
 
Posts: 4 | Registered: April 18, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Denise,

I didn't go through all of your code because that is not an area of expertise for me. But as I understand it, VisDis uses a static file for its input and its location is hard-coded in the html file. The only way that you could alter it would be to run a fex from the page above that re-creates the file with just the contents that you want.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Hi DeniseJ,

Here is information from product manager: The issue with dynamically filtering data in Visual Discovery is that the data is loaded into the Visual Discovery the first time the page is loaded and can then only be accessed via the Visual Discovery API. The data source is static and therefore cannot be changed after the page loads. However, with using real-time data via a WebFOCUS Procedure, the Visual Discovery web page can be drilled down to or updated in-page by reloading the Visual Discovery web page and re-executing the procedure.

The following online document may be of interest as well:
VisDis: Create a Web page based on live data vs. a text file

To obtain an example, please contact Information Builders' Customer Support Serivce and open a case for it. You may either call at 1-800-736-6130, or access the online system InfoResponse. Here is a list of information to be ready when you call: http://techsupport.ibi.com/before_you_call.jsp

Hope this helps. Many thanks for Ginny's help too. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Kerry,

Thanks a bunch for that additional link. We are about to get started with VizDiz here. I poured over the samples and the doc and this new piece will really be helpful in lieu of training.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Visual Discovery Problem

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.