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.
We're creating a hold file for sports and funding and want to give users the option to add sports codes and/or and fund code.
The original hold file is created with a focexec, including a join between the activity tables (for sports codes) and funding tables. We want the users to update the table by adding either the activity code or sports code, as well as descriptions.
The sticking point is how to put the entries in an HTML launch page in order to update the file. Thanks in advance!
Have you thought about using Maintain? Maintain allows you to access more than 15 tables per application. It also helps you build Winforms to display the data and allow the user to update and include.
You need to be licensed to build Maintain applications, but if you are, an application to update two tables is very easy to build.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
Mark is right, Maintain would probably be the best route, however it does use CGI so you might have issues running through MRE? I'm sure Mark will correct me if I'm wrong here.
However, saying that, I use an HTML screen to execute an update via MODIFY, so it can easily be achieved, you just have to think about what you need to do.
Think of a URL or command line to run a fex -
http://[webserver id]/ibi_apps/WFServlet?IBIAPP_app=[app name]&IBIF_ex=[fex name]&Parm1=[value] etc. .........
All you need to do is ensure that your FORM has the INPUT controls named IBIAPP_app, IBIF_ex and any variables you want to pass to the fex.
Whilst you are on the Forum, please visit your profile and add the release, platform and usage to your signature please That way we know how to target any advice according to your set-up etc.
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, 2004
PS I believe to use modify on a table that stays around after the focus/webfocus session has ended requires a MAINTAIN license. Check with your local branch office.
Originally posted by Maintain Wizard: One note, ever since 7.13, Maintain has fully supported Servlet, so it can integrate with the rest of the WebFOCUS suite.
Thanks Mark, that's good to know
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, 2004
Jax, MODIFY can be used without MAINTAIN, oh very definitely. I run MODIFY 24/7. Your Modify task, outlined above, can be done, if its not too big, with a form launched from a fex, and that form gathering a few bits of data from the user and running a fex that performs the MODIFY. This, too, i do. I allow my users to click on a STOCKNUMBER and create a STOCKCLASS code for it, either assign to one existing or create a new one. EG: 1)fex1 lists some products with a drilldown on the stocknumber to fex2. 2)fex2 creates an input form to gather the user input... fex2 is mostly html code
-HTMLFORM BEGIN
<HTML>...
just code your FORM right in here.
selects with dropdown lists for users to chose from..whatever you need.
the 'action' of this form runs fex3, the modify fex
</html>
-HTMLFORM END
3) fex3 takes as parameters the input from the form in fex2, does the modfiy, and reruns fex1 with the list of products now showing the user's new classification code. Any help?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
That is the normal method Susannah, but the method that I use does not require the FEX to be rerun - which I think that yours does?
OK, a bit of a porkie, but the end user does not realise that a fex has been executed.
What I do is to acquire the input from the user of the HTML form and then run an adhoc fex from JavaScript. It makes use of the IB supplied JavaScript functions (why reinvent the wheel?) which makes my life easier
Basically, the JavaScript is something like this, where "keyfield" and "upd_value" are passed as parms to the JS function -
// The XML for this only contains headers and no data so nothing really happens on the client
// as the adhoc request is a MODIFY process to update a file
// Note: that the carriage return and line feed chars are pre-escaped.
var request = '/ibi_apps/WFServlet?IBIC_server=EDASERVE&|IBIAPP_app=reports&|IBIF_adhocfex=
MODIFY FILE SOMEFILE%0D%0AFREEFORM KEYFIELD UPD_VALUE%0D%0AMATCH KEYFIELD%0D%0AON MATCH UPDATE
UPD_VALUE%0D%0ADATA%0D%0A'+keyfield+','+upd_value+',$%0D%0AEND&|Rand='+Math.random();
if(request) {
var xmlDoc = getXml(request);
} else {
alert("Error with Modify process");
}
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, 2004
Sorry, I did not realize you work for IBI. If you don't I would suggest that Jax still get the official word from IBI. I know that they allow you to use modify to create temporary files (files that are deleted when the job completes), but I believe that if the file is not deleted when the job completes you are required to get a license for MAINTAIN.
Susannah, I am looking to develop something similiar where the user needs to manage a table via fex/html/javascript. Please share an example if you have it handy. I have created one fex to display all data and have drilldowns to add/edit/delete on certain columns. I would like to display a launch form for the selected field and have a save/edit/delete buttons to call a sql pass thru fex.
If you only want to insert or update a record at a time you can do this using SQL Passthough. Variable from your HTML launch page can be fed to the DB as shown below.
ENGINE SQLORA SET DEFAULT_CONNECTION [adapter name]
SQL SQLORA SET ERRORTYPE DBMS
SQL SQLORA [or SQLMSS, SQLDB, etc.]
INSERT INTO [your tablename]
(COUNTRY, CAR, MODEL)
VALUES ('&COUNTRY', '&CAR', '&MODEL');
END
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003
I realized that its quite simple to present a fex in the form of "HTML Form" with just inputs and "INSERT","UPDATE", "DELETE". I have the buttons calling the necessary procedures and executing sql pass thrus. I need to give a message that the row has been inserted/updated/deleted. Any ideas? I Can see this (FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND : 1/INSERT but i'd like to make it more presentable and as a Javascript Alert.
Please share any ideas.
Thanks again in advance.
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004
You can make it as complicated as you wish. Personally I prefer to keep this simple and as easy as possible to maintain after I leave. In situations like this I added a fex with the code below and added a -INCLUDE to run it at the end of my SQL Passthrough.
-HTMLFORM BEGIN
</br>
<b>SQL Maintenance Action Completed </br>
</b>
-HTMLFORM END
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003
Alex, How to customize sql return message so we know the action is completed or failed?
Like I said I see this msg but I'd like to make it more meaningful to the user (FOC1364) ROWS AFFECTED BY PASSTHRU COMMAND : 1/INSERT like "1 new row has been inserted to the table" etc., its always either insert, update or delete but, i'd like to be able to display a decent msg. via html.
Thoughts?
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004