July 17, 2007, 11:53 AM
Tony Aquote:
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
July 17, 2007, 02:11 PM
<Jax>We opened a case with Technical Support to confirm that MAINTAIN is required for MODIFY. Details to follow.
July 18, 2007, 10:52 AM
hammo1jQuestion for Maintain Wizard
Can you run a maintain procedure from mre now it uses the servlet?
Regards
John
July 20, 2007, 01:38 AM
susannahJax, 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?
July 20, 2007, 04:33 AM
Tony AThat 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
July 20, 2007, 06:14 AM
susannahi'm just rerunning the original report to give the user confidence that the codeelement was changed, and the opp to proceed to the next one.
July 20, 2007, 10:23 AM
TexasStingraysusannah
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.
Scott
July 20, 2007, 11:18 AM
susannahi don't. MODIFY in all its glory works in the regular product.
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
June 30, 2012, 12:51 AM
vaayuSusannah,
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.
Please advise
Thanks!
-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
June 30, 2012, 06:31 AM
susannahan example of what?
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
June 30, 2012, 11:24 AM
vaayuTrying to figure how to display fex as html form with field(s). That would be fex2 in your scenario.
Hope I'm making sense.please let me know
Thanks!
-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
June 30, 2012, 05:42 PM
susannahnope, you're not making sense. don't know why what you want to do is difficult. seems so basic.
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
July 01, 2012, 05:59 AM
AlexIf 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
July 01, 2012, 10:52 AM
vaayuI 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.
July 02, 2012, 07:43 AM
AlexYou 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
July 02, 2012, 11:12 AM
vaayuAlex,
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?
July 02, 2012, 06:00 PM
AlexThere are lots of threads on the FORUM on SQL Passthrough. Also check out this link:
http://documentation.informati...7/source/topic54.htm
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF