Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Attempting to set the initial value of a drop down parameter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Attempting to set the initial value of a drop down parameter
 Login/Join
 
Guru
posted
I have an HTML doc, with 3 chained drop down boxes (combobox1,2,3). Each uses the Dynamic/Default data source method. Each resolves a parameter and passes to the next. They work as expected.

I am trying to set the initial value of the first box from an amper var (&BUSINESS_MODEL) that is present when the HTML page loads using the following function.

 function onInitialUpdate() {
document.getElementById("combobox1").value = "!IBI.AMP.BUSINESS_MODEL;";
}
 


The drop downs works fine until I add the code above, then it appears blank.

The load task is set to refresh input controls

Is there anything else that must be set to make this work?

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
Don,
Instead of displaying from a data source, can you use a fex?

Example:
  
TABLE FILE CAR
SUM
   COMPUTE COUNTRY/A10 = 'Garland';
   COMPUTE SORT_1/A1   = '1';
   CAR NOPRINT
  BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1;
 ON TABLE HOLD AS HOLD1
END
-RUN
TABLE FILE CAR
SUM
   COMPUTE SORT_1/A1   = '2';
  BY COUNTRY 
 ON TABLE HOLD AS HOLD2
END
-RUN
TABLE FILE HOLD1
PRINT
    COUNTRY
  BY SORT_1 NOPRINT
  BY COUNTRY 
 ON TABLE PCHOLD FORMAT XML
MORE
FILE HOLD2
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Yes, I've been trying to get away from using fex based requests, the explicit method, because in almost every case, the HTML doc develops an error trying to resolve the variables when you open it. It's annoying. Plus I like less moving parts if I can get away with it.

Not sure what's keep this from working, I used an example from an earlier post and it worked in a car example so it should work here.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
Hi Don,
It is "my" understanding, !IBI.AMP is used only within -HTMLFORM statements, may be wrong...
Did you try with single quotes, or, no quotes?
Just kind of guessing now...
Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Yes, single quotes didn't help. Dang, I think your right about the -HTMLFORM, my car example used that and it was working. Okay I'll mark this as [SOLVED].

Thank you,
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
You can hard code a default in the HTML page, or you can use a fex to set a default in a calling HTML page that the composer page will pick up a default for you (which is what we do here).

<html>
<head>
<script type=text/javascript>
function OnLoad() {
var prepParms=[];
prepParms.push("{control}={def value}");
window.sessionStorage.setItem("composerSaveParameters", prepParms.join("^AS^"));
document.forms.temp.submit();
}
</script>
</head>
<body onload="OnLoad()">
<form name="temp" method="get" action="/ibi_apps/WFServlet">
<input type="hidden" name="IBIMR_savedParamFile" value="IBIMR_savedParamFile"/>
<input type="hidden" name="IBFS1_action" value="RUNFEX"/>
<input type="hidden" name="Rand" value="blah blah"/>
<input type="hidden" name="IBFS_path" value="{IBFS file location}"/>
</form>
</body>
</html>


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Attempting to set the initial value of a drop down parameter

Copyright © 1996-2020 Information Builders