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     [CLOSED] Passing parameters using -HTMLFORM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Passing parameters using -HTMLFORM
 Login/Join
 
Gold member
posted
I have a simple HTML form (FORM1) with edit boxes for "Salesperson ID" (linked to a parameter &SalespersonID) and "Customer Number" (liked to a parameter &CustNum) that I need to pass to another HTML form (FORM2) when the "Add" button is pressed.

Image 1 link

Currently, I have the action on the "Add" button linked to a .fex file that contains only one line of code...

-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm


When the "Add" button is pushed, it runs the .fex and pulls the "comm_add.html" file exactly as I want it to... but now I need to pass the parameters from the two edit boxes to the "comm_add.html" so those two columns are filled in when the "comm_add.html" HTML page loads.

Image 2 link

Does anyone know of a way to pass the parameters from FROM1 to FORM2 using the -HTMLFORM code? Or, FOCEXEC?

I am currently using this method in a different part of my HTML page (FORM1), but this part pulls a .fex file first, then I have a link on one of the columns that passes the parameters through the -HTMLFORM .fex file (call_update_form.fex) and then on to FORM2 using a normal FOCEXEC statement:

TYPE=DATA,
     COLUMN=N17,
     FOCEXEC=IBFS:/WFC/Repository/BM_Commissions/Maintenance/call_update_form.fex( \
     SALESID=N1 \
     S4EMPN=N3 \
     S4CNUM=N4 \
     S4ALPH=N5 \
     S4AORI=N6 \
     S4SLMN=N7 \
     S4FROM=N8 \
     S4TOTO=N9 \
     S4SCOP=N10 \
     S4POOL=N11 \
     S4PLAN=N12 \
     S4SHAR=N13 \
     S4PCNT=N14 \
     S4CCOD=N15 \
     S4WHEN=N16 \
     ),
          TARGET='_self',
$  

This message has been edited. Last edited by: FP Mod Chuck,



WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 67 | Registered: May 21, 2014Report This Post
Virtuoso
posted Hide Post
Deej

This is an untested answer but you should be able to reference the parameters with the !IBI.AMP.parmname; syntax where parmname is the case sensitive name of the parameter on your initial screen.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Gold member
posted Hide Post
As in changing the .fex code in my "Add" button link?

From:
-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm


To:
-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm
 !IBI.AMP.SalespersonID;
 !IBI.AMP.CustNum;


If so, that's not doing the trick.

Not sure of the syntax for a -HTMLFORM statement to send the parameters... I'm assuming what I have above in the "To:" section is correct syntax-wise?

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



WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 67 | Registered: May 21, 2014Report This Post
Virtuoso
posted Hide Post
DeeJ

I think the references to !IBI.AMP.SalespersonID;
!IBI.AMP.CustNum; need to be inside the htm file as a hidden field.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Gold member
posted Hide Post
Thanks for the reply Chuck,

The &SalespersonID and &CustNum parameters are already in the htm file, but I'll take a look to be for sure.



WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 67 | Registered: May 21, 2014Report This Post
Virtuoso
posted Hide Post
You need to embed your amper variables into the url you're calling in the focexec. In your focexec, make your line of code something on the lines of this --

-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm?SalespersonID=&SalespersonID&CustNum=&Custnum


Your two amper variables will resolve at runtime to their passed values. Something the lines of --

-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm?SalespersonID=0012345&CustNum=06762


This is your goal. That url is how you pass form variables on web-based systems. The html form specification uses a ? to start the list of variables, an ampersand between each to separate them.

But there's a little complexity here, because your focexec is going to want to resolve that ampersand before the CustNum parameter into an amper variable. You're in a focexec after all. That will hose the text of your url call.

-HTMLFORM IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm?SalespersonID=001234506762=06762


You very likely need to use a -SET command to assemble your url from two pieces prior to the HTMLFORM command, something like this --

-SET &URL_CALL = 'IBFS:/WFC/Repository/BM_Commissions/Maintenance/comm_add.htm?SalespersonID=&SalespersonID&' || 'CustNum=&Custnum' ;


Note the concatenation after SalespersonID. That separates the ampersand from the text that follows. FOCUS will leave it alone. Then you make your call with --

-HTMLFORM &URL_CALL


I'm just shooting from the hip so I'm sure there's a few errors hiding in what I show above, but that's the concept. You're hand-assembling a Method=Get html form call on the url line, which WebFOCUS is more than happy to take and pull amper variables out of.

I've done this about 100 times, though usually I'm doing it in javascript inside a focexec. The concept is the same though, and it works well up through 2048 characters. After that you have to create a Post form call, which is an advanced topic!

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Gold member
posted Hide Post
Makes PERFECT sense John, thanks!

I'll give that a shot!



WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 67 | Registered: May 21, 2014Report This Post
Gold member
posted Hide Post
John,

I gave your suggestion a shot this morning and I've tried as many variations of your &URL_CALL that I can think of... even putting the actual parameter values into the -SET line.

Everything I've tried gives me the exact same error:
 
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> 
- <ibfsrpc _jt="IBFSResponseObject" language="EN" localizeddesc="Names cannot contain any of the following characteres: Space&*()|:;",?/" name="runAdHocFex" returncode="8017" 
returndesc="Names cannot contain any of the following characteres: Space&*()|:;",?/" subreturncode="0" subsystem="" type="simple">
 



WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 67 | Registered: May 21, 2014Report This Post
Virtuoso
posted Hide Post
Can you see the url that results from the call?

You may be able to do

-HTMLFORM http://servername/ibi_apps/ . . .

. . . instead of the IBIFS in order to get your elaboration fully controllable and correct.

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report 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     [CLOSED] Passing parameters using -HTMLFORM

Copyright © 1996-2020 Information Builders