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 have a data is of LONG/CLOB type in my database and I need to pass this to a database table by a button click. I am attaching my code for better understanding.
Code in my testareapass.fex(Calling form) ---------------------------- Note :- I have changed the < to } inorder to avoid the creation of the objects in this editor
TABLE FILE WFTST_LONG PRINT TST_CLOB WHERE ID=1 ON TABLE HOLD AS HOLD1 FORMAT ALPHA END -HTMLFORM BEGIN -{html} -{head} -{title}Insert FTM file in Select{/title} -{/head} -{body} -{form name=form action=WFServlet target=_blank} -{input type=hidden name=IBIF_ex value=postdata.fex} -{span style="position:absolute; top:180; left:10;"}Textarea{/span} -{textarea name=sqlqryta style="position:absolute; top:180; left:200;" rows="10" cols="72" value=" "} -INCLUDE HOLD1.ftm -{/textarea} -{INPUT onclick="do_escape[);" style="POSITION: absolute; TOP: 470px; LEFT: 160px; WIDTH: 80px; HEIGHT: 30px;" type="button" value=Submit} -{/form} -{script language=javascript} -function do_escape() { - TXobj = document.getElementById("sqlqryta"); - TXobj.value = escape(TXobj.value); - document.form.submit(); - TXobj.value = unescape(TXobj.value); -} -{/script} -{/body} -{/html} -HTMLFORM END
Please note that , I am directly assigning the HOLD.ftm as the value for the textarea.
code in by postdata.fex ------------------------- -TYPE sqlqryta &sqlqryta -EXIT ENGINE SQLORA SET DEFAULT_CONNECTION myconn SQL SQLORA EX wfpackage1.p_tst_long_clob '&sqlqryta'; END
(I have commented the package call to see whether values are coming to the FEX)
Here I am able to pass upto 4700 characters (including the escaped ones lke %20). If I exceed this i will get an error as Unknown error occurred. ERROR:
I need to pass atleast 10000 characters to the postdata.fex and save to the database table
Or
Can I call the oracle package from the the testareapass.fex button on click (From Javascript)?
Any suggestions ?
Thanks and regards, Johney.
Version 7.6.11 Webfocus installed in AIX 5.3, desktop PC: Windows-XP based Output: Excel, HTML, PDF
This code by the way will work for the maximum length of an &variable, which is 32KB. The trick is in the METHOD=POST within the form declaration. You did not put anything there, which then will default to METHOD=GET. This will create a URL with all text in it, and is limited in length. METHOD=POST does not have this limitation.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Thanks GamP for converting my code with actual syntax,
So there are no tricks to pass more than 32KB? How can I understand that 4700 character is crossing 32KB. My requirement is to pass atleast 10000 characters including escape characters.
Is there any way that we can call the oracle precedure from the button click event? If that is possible we need not pass this to a second fex to call a oracle package. Any idea ?
Thanks and regards, Johney.
Version 7.6.11 Webfocus installed in AIX 5.3, desktop PC: Windows-XP based Output: Excel, HTML, PDF
Passing a textarea is always tricky. Can you post the code of your postdata.fex? I've used the IBIF_adhocfex in the past for posting large textarea values, but you will need to include your code in the textarea. Something like:
<textarea name="IBIF_adhocfex">
MODIFY FILE X
FREEFORM Y/TX80
COMPUTE SOMEKEY=SOMEVALUE;
MATCH SOMEKEY
ON NOMATCH INCLUDE
DATA
Some really frikin huge amount of data .... <== this is where your file would go.
%,$
END
</textarea>
Or something like that ... I'm going off memory for this one.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
I have just a TYPE command in the postdata.fex as,
-TYPE sqlqryta &sqlqryta
This is giving me error if the no.of characters passes from the calling FEX is greater than 4700 even in "method=post"
Are you suggesting me to change the name of textarea as IBIF_adhocfex and include the MODIFY FILE etc inside the textare ? Do you have code snippet which will work ?
Thanks and regards, Johney.
Version 7.6.11 Webfocus installed in AIX 5.3, desktop PC: Windows-XP based Output: Excel, HTML, PDF
Note: to test, enter a key value followed by a comma in the textarea before entering the large amount of data ... this is just to test afterall! Hope this helps.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott