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     Result of Drop Down not resolving properly

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Result of Drop Down not resolving properly
 Login/Join
 
Silver Member
posted
We are on WebFocus 7.1.1 and have WebLogic for our client server and Solaris for our report server. We are having some difficulty passing or subsequently using the result from a form select
for example:

Later on the &RPT value is tested in the following manner:

-IF &RPT.EVAL EQ 'mtrc_sumstat' OR 'mtrc-avgcnts' OR 'mtrc-avgcnts-bgs2' OR 'mtrc-intl-counts'
- THEN GOTO MGRRPTS ELSE GOTO SKIPNEW;
-MGRRPTS

-GOTO RESTOFPARMS
-SKIPNEW

-RESTOFPARMS

etc.

The value for &RPT is lost or 'null' when it is used in a subsequent test. We've tried the following
workarround:
-SET &RPT = '&'||RPT;
which works in some instances but doesn't work in the above sample.

Has anyone encountered these problems and what was your resolution?
 
Posts: 37 | Registered: November 22, 2005Report This Post
Expert
posted Hide Post
quote:

-IF &RPT.EVAL EQ 'mtrc_sumstat' OR 'mtrc-avgcnts' OR 'mtrc-avgcnts-bgs2' OR 'mtrc-intl-counts'
- THEN GOTO MGRRPTS ELSE GOTO SKIPNEW;


Try quotes around your & variable:

-IF '&RPT.EVAL' EQ 'mtrc_sumstat' OR 'mtrc-avgcnts' OR 'mtrc-avgcnts-bgs2' OR 'mtrc-intl-counts'
- THEN GOTO MGRRPTS ELSE GOTO SKIPNEW;

If still not working, then remove the .EVAL.

WF is also case-sensitive...

Tom

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
Thanks Tom,

I tried all these suggestions without success.

What is the command you need to enter into a post so that all the code shows up?
 
Posts: 37 | Registered: November 22, 2005Report This Post
Expert
posted Hide Post
focuscon,

The codes you require to place around your code snippets on the forum are [ code] and [ /code] (without the spaces).

You should use -IF &RPT EQ ....... to get the best results with dialogue manager. However, if you need to test the value in a TABLE request then surround the variable with single quotes - e.g. WHERE fieldname EQ '&RPT'.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Focuscon,

Are you using EX to call another fex in your procedure? If so then you will loose the values of your variables.
Use
-INCLUDE fexname
or
EX fexname &var1=val1, &var2=val2

Paul


Paul Burridge
Senior Consultant
34 years with Information Builders
WebFOCUS 8.2.5 Win10
 
Posts: 17 | Location: The Netherlands | Registered: February 21, 2005Report This Post
Silver Member
posted Hide Post
Sorry, I didn't have the proper delineation for the code I inserted in my example. The select within the HTMLFORM BEGIN/END is:
  <select size="1" name="RPT" id="LB4" onchange="javascript:showit()">
      <option value="hrrptturn">Turnover</option>
      <option value="hrrptheadcnt">Workforce Headcount</option>
      <option value="mtrc-hrrptretelig">Retirement Eligibility</option>
      <option value="hrrptstafmov">Staff Movement</option>
      <option value="hrrptopenreq">Open Requisitions</option>
      <option value="hrrptplace">Placements</option>
-IF &AUTH2 NE 0 THEN GOTO ANNSRPTS ELSE GOTO SKIPANNS;
-ANNSRPTS
      <option value="mtrc_sumstat">Summary Statistics</option>
      <option value="mtrc-intl-counts">International Counts</option>
      <option value="mtrc-avgcnts">Average Staff Counts by BGS1</option>
      <option value="mtrc-avgcnts-bgs2">Average Staff Counts by BGS2</option>
-SKIPANNS
    </select>


Later on the &RPT is tested in the following manner:


-IF '&RPT' EQ 'mtrc_sumstat' OR 'mtrc-avgcnts' OR 'mtrc-avgcnts-bgs2' OR 'mtrc-intl-counts'
-                 THEN GOTO MGRRPTS ELSE GOTO SKIPNEW;
-MGRRPTS
<INPUT TYPE='HIDDEN' NAME='IBIF_ex'    VALUE='mtrc-jf'>
-GOTO RESTOFPARMS
-SKIPNEW
<INPUT TYPE='HIDDEN' NAME='IBIF_ex'    VALUE='mtrc-hrrptparm2'>
-RESTOFPARMS
<INPUT TYPE='HIDDEN' NAME='IBIAPP_app' VALUE='coreuser-rf'>
<INPUT TYPE='HIDDEN' NAME='LBL'        VALUE='BLDFORM'>
<INPUT TYPE='HIDDEN' NAME='OPRID'      VALUE='&OPRID.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FULL_NAME'  VALUE='&FULL_NAME.EVAL'>
<INPUT TYPE='HIDDEN' NAME='GLOBACC'    VALUE='&GLOBACC.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FROMDATE1'  VALUE='&FROMDATE1.EVAL'>
<INPUT TYPE='HIDDEN' NAME='THRUDATE1'  VALUE='&THRUDATE1.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FROMDATE2'  VALUE='&FROMDATE2.EVAL'>
<INPUT TYPE='HIDDEN' NAME='THRUDATE2'  VALUE='&THRUDATE2.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FROMDATE3'  VALUE='&THRUDATE3.EVAL'>
<INPUT TYPE='HIDDEN' NAME='THRUDATE3'  VALUE='&THRUDATE3.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FROMDATE4'  VALUE='&THRUDATE4.EVAL'>
<INPUT TYPE='HIDDEN' NAME='THRUDATE4'  VALUE='&THRUDATE4.EVAL'>
<INPUT TYPE='HIDDEN' NAME='RETELIG'    VALUE='&RETELIG.EVAL'>
<INPUT TYPE='HIDDEN' NAME='RETELIGY'   VALUE='&RETELIGY.EVAL'>
<INPUT TYPE='HIDDEN' NAME='GRADE'      VALUE='&GRADE.EVAL'>
<INPUT TYPE='HIDDEN' NAME='EEDEPTID'   VALUE='&EEDEPTID.EVAL'>
<INPUT TYPE='HIDDEN' NAME='RPTTYPE'    VALUE='&RPTTYPE.EVAL'>
<INPUT TYPE='HIDDEN' NAME='OPERMETRIC' VALUE='&OPERMETRIC.EVAL'>
<INPUT TYPE='HIDDEN' NAME='FEX'        VALUE='&RPT.EVAL'>
<INPUT TYPE='HIDDEN' NAME='STARTDATE'  VALUE='&STARTDATE.EVAL'>
<INPUT TYPE='HIDDEN' NAME='ENDDATE'    VALUE='&ENDDATE.EVAL'>
</form>
</body>
</html>
-HTMLFORM END

The code always takes the -SKIPNEW route even when I select the ones that are specifically tested.
 
Posts: 37 | Registered: November 22, 2005Report This Post
Member
posted Hide Post
The code looks ok.
Test the value of &RPT. Put this in your procedure:
-SET &ECHO='ALL';
...
-TYPE RPT = &RPT
-EXIT
Is it the value that you expect?

Paul


Paul Burridge
Senior Consultant
34 years with Information Builders
WebFOCUS 8.2.5 Win10
 
Posts: 17 | Location: The Netherlands | Registered: February 21, 2005Report This Post
Silver Member
posted Hide Post
No Paul, it's blank. That's what a View Source reflects
 
Posts: 37 | Registered: November 22, 2005Report This Post
Virtuoso
posted Hide Post
focuscon,

To the best of my knowledge, this is illegal syntax. You are not allowed to put &variables and dialog manager in a -HTMLFORM BEGIN/END. Even if it is working, it will fail after a future upgrade at some point.

Can I suggest you try:
-HTMLFORM BEGIN
 ... some html here.

  <select size="1" name="RPT" id="LB4" onchange="javascript:showit()">
      <option value="hrrptturn">Turnover</option>
      <option value="hrrptheadcnt">Workforce Headcount</option>
      <option value="mtrc-hrrptretelig">Retirement Eligibility</option>
      <option value="hrrptstafmov">Staff Movement</option>
      <option value="hrrptopenreq">Open Requisitions</option>
      <option value="hrrptplace">Placements</option>
-HTMLFORM END
-IF &AUTH2 NE 0 THEN GOTO ANNSRPTS ELSE GOTO SKIPANNS;
-ANNSRPTS
-HTMLFORM BEGIN
      <option value="mtrc_sumstat">Summary Statistics</option>
      <option value="mtrc-intl-counts">International Counts</option>
      <option value="mtrc-avgcnts">Average Staff Counts by BGS1</option>
      <option value="mtrc-avgcnts-bgs2">Average Staff Counts by BGS2</option>
-HTMLFORM END
-SKIPANNS
-HTMLFORM BEGIN
    </select>

 ... some more code here

-HTMLFORM END

-SET &RPT_TO_RUN = '&RPT' EQ 'mtrc_sumstat' OR 'mtrc-avgcnts' OR 'mtrc-avgcnts-bgs2' OR 'mtrc-intl-counts'
-                 'mtrc-jf' ELSE 'mtrc-httptparm2';

-HTMLFORM BEGIN
<INPUT TYPE='HIDDEN' NAME='IBIF_ex'    VALUE='!IBI.AMP.PRT_TO_RUN;'>
<INPUT TYPE='HIDDEN' NAME='IBIAPP_app' VALUE='coreuser-rf'>
<INPUT TYPE='HIDDEN' NAME='LBL'        VALUE='BLDFORM'>
<INPUT TYPE='HIDDEN' NAME='OPRID'      VALUE='!IBI.AMP.OPRID;'>
 
  <!-- change all the &varaibles to !IBI.AMP.varname; -->

<INPUT TYPE='HIDDEN' NAME='ENDDATE'    VALUE='!IBI.AMP.ENDDATE;'>
</form>
</body>
</html>
-HTMLFORM END
  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
you can totally load up your htmlforms with &vars, my whole site lives on it, blissfully.
(nb there are times when i have to go from isapi to servlet, tho, in order to make a really complex one work)
I just look at your original code and wonder why you have .EVAL when you're comparing two character strings ???
-IF &MYPARM EQ 'FRED' OR 'LUCY' OR 'RICKY'
works fine, but not
-IF &MYPARM.EVAL EQ 'ETHEL' OR 'LITTLE RICKY'

That .EVAL is best used sparingly. I have found it necessary when used as a commment statement, eg.
-SET &NODO = IF ... THEN ' ' ELSE '-*';
&NODO.EVAL COMPUTE yada yada...

but i avoid using it as a rule everywhere, until i find i abs have to use it.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
From the Doc.

Syntax: How to Use a Variable in a Web Page

The syntax for a local variable in a form input field is

<INPUT TYPE=TEXT NAME=variable     VALUE="!IBI.AMP.variable;">


where:

variable

Is the variable name.

- Just because you can do something, doesn't mean you should.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Silver Member
posted Hide Post
dHagen,

Thanks for your suggestion. I'm trying to segment my code as you suggested but I have a couple of questions and an explanation that introduces more complexity.

Question # 1.
Your first -HTMLFORM END placement and next -HTMLFORM BEGIN seem to be placed rather strategically. Am I reading more into it than necessary, or is there strategic revelance?

Question # 2.
Your example contains three sets of -HTMLFORM BEGIN and -HTMLFORM END. Could there be two sets instead of three?

Question # 3.
Assuming that within my single set of -HTMLFORM BEGIN and -HTMLFORM END I have , and
statements, wouldn't I have terminate them (
, and before each -HTMLFORM END and
repeat them as necessary for each set?

Explanation # 1.
Within my original single set of -HTMLFORM BEGIN and -HTMLFORM END I have JavaScript cases defined for each report selection like
   case="mtrc_sumstat";
      asofdate.style.display="none"
      asofdt05.style.display="none"
      ftdate.style.display="none"
      ftdate05.style.display="none"
      retelig.style.display="none"
      auth2.style.display=""
      document.WFForm1.THRUDATE3.selectedIndex = -1 ;
      document.WFForm1.THRUDATE4.selectedIndex = -1 ;
      document.WFForm1.FROMDATE1.selectedIndex = -1 ;
      document.WFForm1.THRUDATE1.selectedIndex = -1 ;
      document.WFForm1.RETELIG.selectedIndex = -1 ;
      document.WFForm1.RETELIGY.selectedIndex = -1 ;
      document.WFForm1.STARTDATE.selectedIndex = -1 ;
      document.WFForm1.ENDDATE.selectedIndex = -1 ;

      break;


preceeding the select code and then following the select code, each of these cases are coded like:
-* From Thru Dates for AUTH2 selections
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF"
width="100%" id="auth2">
<tr>
<td width="20%" bgcolor="#E7E9E0">
<font face="Verdana" size="2" color="#003399">
[b]
Select Dates:[/b]<br>
</font></td>
<td width="45%" bgcolor="#E7E9E0">
<font face="Verdana" size="2" color="#003399">
[b]From:
&|nbsp;
<select name="STARTDATE" size="1">
!IBI.FIL.START_DT;
</select>
&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;
<input type="submit" value="Build Parameters">
<br>
To:
&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;
<select name="ENDDATE" size="1">
!IBI.FIL.END_DT;
</select>
&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;
<input type="button" onClick="top.location.reload(); self.close()"
 value="&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;Reset&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;"
 name="B2">
[/b]</font></td>
<td width="30%" bgcolor="#E7E9E0">
<font face="Verdana" size="2" color="#003399"><b>
&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;<a href="/approot_hr/coreuser-rf/hrmtrc-helpdoc.pdf" target="_blank">HELP</a>
</td>
</tr>
<tr>
<td colspan="4" bgcolor="#E7E9E0"><hr SIZE="2"></td>
</tr>
</table>


What I'm trying to say is that it would be hard to split up. What my tests of the segmented code is showing is
WebFOCUS was called with an invalid request. which could mean anything.
 
Posts: 37 | Registered: November 22, 2005Report This Post
Virtuoso
posted Hide Post
I'm with Sussanah on this one.

In the manual it states in the -HTMLFORM section:
Note: All lines that are not Dialogue Manager commands are assumed to be HTML.

By implication, this means that Dialogue Manager commands are supported within -HTMLFORM BEGIN and END.

Variables within an html page should be inserted with the !IBI.AMP.var; syntax. But that does not mean that the DM controlling the html page output cannot use &vars.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Silver Member
posted Hide Post
I appreciate everyone's contribution. I have it working. I let it continue on to
mtrc-hrrptparm2-jf and then tested &fex in that fex. I had a little experimentation on which to use (&FEX or &fex) but that was resolved. I also had some difficulty with having an mtrc-hrrptparm2-jf, but it started working when I removed it. Basically, it was too early to change the alternate route.

Thanks again everyone.
 
Posts: 37 | Registered: November 22, 2005Report 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     Result of Drop Down not resolving properly

Copyright © 1996-2020 Information Builders