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.
I are trying to develop a report to update a database.There are two fexes.
Main report contains all the input fields, so the user can enter information and click update. When the update button is clicked, all the input field information is retrieved through javascript code and stored into the hidden controls and then passed as parameters to a procedure which processes and executes the modify statements. After finishing all the steps, we would like a method to redirect back to the main report. I am using a workaround by having a "go back" button. But is there a way to automatically go back after update instead.
This is the fex that does the update.
MODIFY FILE NEO_FORECAST_ADJUSTMENT
FIXFORM FROM HFRCST
MATCH COMPANY CUSTOMER
ON MATCH UPDATE SALES_FORECAST_MO1 SALES_FORECAST_MO2 SALES_FORECAST_MO3 SALES_FORECAST_MO4 SALES_FORECAST_MO5 SALES_FORECAST_MO6 SALES_FORECAST_MO7 SALES_FORECAST_MO8 SALES_FORECAST_MO9 SALES_FORECAST_MO10 SALES_FORECAST_MO11 SALES_FORECAST_MO12 LAST_CHANGE_DATE LAST_CHANGE_USER
DATA ON HFRCST
END
-RUN
-EXIT
DEFINE FILE NEO_FORECAST_ADJUSTMENT
BUTTON/A100='click here';
END
TABLE FILE NEO_FORECAST_ADJUSTMENT
PRINT BUTTON
END
-*FOCEXURL
-*EXEC forecast_worksheet_kiran
-RUN
-HTMLFORM BEGIN
<html>
<head>
<META HTTP-EQUIV="REFRESH" URL="http://uns40-114/ibi_apps/WFServlet?IBIF_ex=forecast_worksheet_kiran">
</head>
<body>
Updated Sales Forecast successfully, click here to go back to the report.
</body>
</html>
-HTMLFORM END
This message has been edited. Last edited by: Kerry,
couldn't you just have an "onLoad" action on your HTMLFORM that automatically executes the specified URL? That seems easiest or maybe I'm making it too simple.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Just try this, it will update and return back to the called fex automatically after the update is done
MODIFY FILE NEO_FORECAST_ADJUSTMENT FIXFORM FROM HFRCST MATCH COMPANY CUSTOMER ON MATCH UPDATE SALES_FORECAST_MO1 SALES_FORECAST_MO2 SALES_FORECAST_MO3 SALES_FORECAST_MO4 SALES_FORECAST_MO5 SALES_FORECAST_MO6 SALES_FORECAST_MO7 SALES_FORECAST_MO8 SALES_FORECAST_MO9 SALES_FORECAST_MO10 SALES_FORECAST_MO11 SALES_FORECAST_MO12 LAST_CHANGE_DATE LAST_CHANGE_USER DATA ON HFRCST END -RUN -EXIT DEFINE FILE NEO_FORECAST_ADJUSTMENT BUTTON/A100='click here'; END TABLE FILE NEO_FORECAST_ADJUSTMENT PRINT BUTTON
MODIFY FILE NEO_FORECAST_ADJUSTMENT FIXFORM FROM HFRCST MATCH COMPANY CUSTOMER ON MATCH UPDATE SALES_FORECAST_MO1 SALES_FORECAST_MO2 SALES_FORECAST_MO3 SALES_FORECAST_MO4 SALES_FORECAST_MO5 SALES_FORECAST_MO6 SALES_FORECAST_MO7 SALES_FORECAST_MO8 SALES_FORECAST_MO9 SALES_FORECAST_MO10 SALES_FORECAST_MO11 SALES_FORECAST_MO12 LAST_CHANGE_DATE LAST_CHANGE_USER DATA ON HFRCST END -RUN -EXIT DEFINE FILE NEO_FORECAST_ADJUSTMENT BUTTON/A100='click here'; END TABLE FILE NEO_FORECAST_ADJUSTMENT PRINT BUTTON
MODIFY FILE NEO_FORECAST_ADJUSTMENT FIXFORM FROM HFRCST MATCH COMPANY CUSTOMER ON MATCH UPDATE SALES_FORECAST_MO1 SALES_FORECAST_MO2 SALES_FORECAST_MO3 SALES_FORECAST_MO4 SALES_FORECAST_MO5 SALES_FORECAST_MO6 SALES_FORECAST_MO7 SALES_FORECAST_MO8 SALES_FORECAST_MO9 SALES_FORECAST_MO10 SALES_FORECAST_MO11 SALES_FORECAST_MO12 LAST_CHANGE_DATE LAST_CHANGE_USER DATA ON HFRCST END -RUN -EXIT DEFINE FILE NEO_FORECAST_ADJUSTMENT BUTTON/A100='click <a href="http://uns40-114/ibi_apps/WFServlet?IBIF_ex=forecast_worksheet_kiran">here</a>'; END TABLE FILE NEO_FORECAST_ADJUSTMENT PRINT BUTTON
not sure why there's an EXIT in the middle of that fex, or how you would get around it.. but i just do this MODIFY FILE whatever .... END -RUN EX app/forecast_worksheet_kiran if its in the same domain or EX {domainname}/app/forecast_worksheet_kiran if it not in the same domain or -MRNOEDIT EX {appname}/forecast_worksheet_kiran.fex if its on the backend Works for me.. no user involvement..it just runs as soon as the modify is done.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
-DEFAULT &RunType = ':Report'
-GOTO &RunType;
-:Report
DEFINE FILE .....
END
TABLE FILE ......
PRINT COMPUTE ...
ON TABLE SAVE AS MYHTML FORMAT HTMTABLE
style etc ....
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title></title>
</head>
<body>
<form>
<input type="hidden" name="RunType" value=":Update' />
!IBI.FIL.MYHTML;
</form>
</body>
</html>
-HTMLFORM END
-EXIT
-:Update
MODIFY FILE ......
FREEFORM field1 field2 ......
MATCH field1
ON MATCH CONTINUE
ON NOMATCH REJECT
MATCH field2
ON MATCH CONTINUE
ON NOMATCH REJECT
DATA
-* build your parms from your data entry form here
END
-RUN
-GOTO :Report;
Basically, after the update section redirect your report to the top of the fex to display your HTML form. Advantage is that the two component parts of the entire process are contained in one location rather than two or more - possibly reducing maintenance overheads. Use the power of dialogue manager!
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
If you execute your update using an AJAX call, then you would not have to go back because the page contents would not change. When the call finishes successfully, then you can just show an alert box to let the user know what happened ... if that is required.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott