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] Redirect from one report to another

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Redirect from one report to another
 Login/Join
 
Platinum Member
posted
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,


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
 
Posts: 116 | Registered: April 23, 2007Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Member
posted Hide Post
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

END
-*FOCEXURL
-*EXEC forecast_worksheet_kiran

-RUN
-HTMLFORM BEGIN











-HTMLFORM END


WebFOCUS 7.0.4
Windows XP
HTML
PDF
EXCEL
 
Posts: 7 | Registered: April 01, 2008Report This Post
Member
posted Hide Post
oops ..

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











-HTMLFORM END


WebFOCUS 7.0.4
Windows XP
HTML
PDF
EXCEL
 
Posts: 7 | Registered: April 01, 2008Report This Post
Expert
posted Hide Post
Put your HTML between the code tags
 

the RED </> at the far right of the toolbar, above.
 


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
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

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 onload="javascript:form1.submit();">
<form name=form1 method=post action="/ibi_apps/WFServlet" target=_self>
<input type=hidden name=IBIF_ex value=forecast_worksheet_kiran>
</form>
</body>

</html>
-HTMLFORM END


WebFOCUS 7.0.4
Windows XP
HTML
PDF
EXCEL
 
Posts: 7 | Registered: April 01, 2008Report This Post
Platinum Member
posted Hide Post
Thanks ALOOP your code worked perfectly. TexasStingray, we do not have Maintain.


Prod: WebFocus 7.7.3 Win 2003
Dev: WebFocus 7.7.3 Win 2003
 
Posts: 116 | Registered: April 23, 2007Report This Post
Expert
posted Hide Post
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, 2003Report This Post
Expert
posted Hide Post
Why not have a single fex?

-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, 2004Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report 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] Redirect from one report to another

Copyright © 1996-2020 Information Builders