Focal Point
[CLOSED] dynamic list box

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6731070662

January 14, 2008, 03:55 PM
jbond007
[CLOSED] dynamic list box
i have a dynamic list box that is triggered by a button. This show all the items that a user has access to. However, when I use the tool, it deletes the default value of "ALL". How can I pass this value as part of the XML file that is being generated.


Thanks,

jd

This message has been edited. Last edited by: Kerry,


7.61, nt
Output: excel, pdf, html,
January 18, 2008, 01:21 PM
Kerry
Hi jd,

Has this issue been resolved? Just wondering, is this the same issue as the other post you have: https://forums.informationbuilders.com/eve/forums/a/tpc/...191040662#8191040662

If not, then can you please provide a little more info about the problem? For example, are you working in Dev Studio? When you mentioned "the tool", which tool are you referring to? i.e. Report Assist, Graph Assist, etc. If possible, would you mind to share your current with all? These questions may help us better understand the problem and then offer further directions.

Thank you in advance for sharing with all. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
January 18, 2008, 02:06 PM
dhagen
I'm not sure, but is this what you are asking for?
TABLE FILE SYSTABLE
PRINT COMPUTE C1/A10 = 'FOC_NONE';
      COMPUTE C2/A10 = '(All)';
      NAME NOPRINT
      COMPUTE CTR/I5 = 0;
WHERE RECORDLIMIT EQ 1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TOUT FORMAT ALPHA
END
 
-RUN
FILEDEF TOUT CLEAR
FILEDEF TOUT DISK tout.ftm (APPEND
 
TABLE FILE CAR
PRINT COUNTRY AS 'C2'
      COMPUTE CTR/I5 = LAST CTR + 1;
BY COUNTRY AS 'C1'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TOUT FORMAT ALPHA
END
-RUN
 
TABLE FILE TOUT
PRINT C2
BY CTR NOPRINT
BY C1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
-RUN  


Either that, or in the JavaScript that you use to load the object, start loading in position 1 not 0.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
January 23, 2008, 11:40 AM
jbond007
dhagen,


I did something like this to append the file. This is exactly what I wanted. However, I'm still having problem with the other one I'm trying to do.

This one is a pop menu that will allow the user to select multiple values from a drop down list box. The value is then passed to the main form for processing.

The reason I'm trying to do it this way is to save real estate on the form. Currently, users have to scroll down make a selection on a field. We have numerous selections on the screen. Most of the are chained.

By having the item selected on a pop-up allow us to save space and makes it cleaner and looks way professional.


Any offer you can provide is greatly appreciated.


Thanks,


JD


7.61, nt
Output: excel, pdf, html,
May 31, 2010, 11:30 AM
WFLurker
quote:
Originally posted by jbond007:
dhagen,


I did something like this to append the file. This is exactly what I wanted. However, I'm still having problem with the other one I'm trying to do.

This one is a pop menu that will allow the user to select multiple values from a drop down list box. The value is then passed to the main form for processing.

The reason I'm trying to do it this way is to save real estate on the form. Currently, users have to scroll down make a selection on a field. We have numerous selections on the screen. Most of the are chained.

By having the item selected on a pop-up allow us to save space and makes it cleaner and looks way professional.


Any offer you can provide is greatly appreciated.


Thanks,


JD



Looking thru focal point I came upon this thread on Listbox popup.

Similar to this case I'm looking to save real estate on the main parameter form and have popup filter selection that passes to the main form.

Here is how I envision the report to look using the CAR table:

Main Parameter form:

COUNTRY (Drop Down List) ---> Press push button to open a POPUP screen with all the Countries listed. Select your countries and press submit from the popup screen. This update the dropdown list on the main form.

CAR (Drop Down List)

MODEL (Drop Down List)

BODTYPE (Drop Down List)


Chaining would be nice for the popup.

I'm still trying to wrap my head around how to do this. I'm assuming using XML and javascript?

Any pointers would be great..

Thanks,

Lurker

This message has been edited. Last edited by: WFLurker,


WF 8105M
- Portal, Dashboard
- Rcaster, Data Migrator
- Windows 2012 Client Server
- Dev/App Studio 8105
- Data: SQL, Oracle, Neteeza,MVS
June 01, 2010, 04:08 AM
Tony A
Lurker,

I do exactly this type of input prompting using modal HTML. The called modal HTML page looks like this -
<html>
<head>
<title>Countries</title>
<SCRIPT id=IbiOptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls";
var multidrill = "multidrill";
var mntFormValidate = "mntFormValidate";
var dyncalendar = "dyncalendar";
var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,dyncalendar,multidrill);
</SCRIPT>
<SCRIPT id=nls src="/ibi_html/javaassist/nls.js" type=text/javascript>
</SCRIPT>
<SCRIPT id=ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript>
</SCRIPT>
<script language=javascript>
function pass_value() {
  returnValue = "";
  ctrlObj = document.getElementById("Country");
  for (i=0;i<ctrlObj.length;i++) {
    if (ctrlObj(i).selected) {
      returnValue += "'"+ctrlObj(i).value+"',";
    }
  }
  if (returnValue.length >= 1) {
    returnValue = returnValue.substring(0,returnValue.length-1);
  }
  self.close();
}
</script>
</head>
<body style="background-color: #CFDCDF;" onload="OnLoad();">
<form id=form method=get>
<input type=hidden id="Country" name="Country" value="~" />
<input type=hidden id="IBIAPP_app" name="IBIAPP_app" value="reports" />
<input type=hidden id="IBIC_server" name="IBIC_server" value="EDASERVE" />
<input type=hidden value=14:47:56 name ="IBIMR_random" />
<span style="position:absolute; top:5px; left:5px; width:150px; height:40px;">Country Selection</span>
<select id="Country" style="position:absolute; top:35px; left:25px; width:175px;"
        name="Country" elementname="combobox1" elementtype="combobox" sourcetype="typeFex" labelid
        caption="combobox" operation="NONE" datatype="0" addalloption="-1" dynalldisplayvalue="-- Select --"
        inchainindex="-1" chainnumber="-1" cacheruntimedata="0" displayfield numofrecords="-1" datafield
        datasource="r1368ch1.fex" datafieldtype="CHAR" ibiformat IBIAPP_app="reports" IBIC_server="EDASERVE"
        multiple size="16"></select>
<input type=button style="position:absolute; top:325px; left:25px;" id="sub_button" onclick="pass_value();"
       value="Return Value(s)" />
</form>
<script language=javascript>
function OnLoad() {
  opctrl = document.getElementById("Country");
  var request = '/ibi_apps/WFServlet?IBIC_server=EDASERVE&IBIAPP_app=reports&IBIF_ex=yourfex&Rand='+Math.random();
  if(request) {
    var xmlDoc = getXml(request);
    populateCtrlFromXmldoc(xmlDoc, opctrl);
  } else {
    alert("An error populating input control");
  }
  document.getElementById('sub_button').focus();
}
</script>
</body>
</html>
and can be called within your parent page using the following JavaScript -
  var url = "/ibi_html/Country_Prompt.htm?Rand="+Math.floor(Math.random()*100000);
  var Countries = showModalDialog(url,"","dialogWidth:200px; dialogHeight:340px; status:no; center:yes");

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10