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     [CLOSED] Import field value for reporting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Import field value for reporting
 Login/Join
 
Guru
posted
Hello,

My application currently takes in upto 270~ job id's on a text field (the limitation is because the text area can only have 4095 characters). The job id's are seperated by comma. I'd like to enhance the future so that users are able to import in a csv file full of job id's instead of having to type them on the text box. Keep in mind, multiple users can run this report simultaneously and may overwrite each others file if storing the imported file on the server. Logic needs to be built in for that. Also, I have no way of knowing who is currently running the report because we run all our reports using a generic id.

I saw an import future for version 767+, where users are able to import in a excel file, but that seems to work only with reporting objects. All our reports run from the server, nothing from MRE. We are in version 768 here. Any suggestions would be greatly appreciated.

Thanks,
Sayed

This message has been edited. Last edited by: Kerry,


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
How are you submitting this job, is this from a web page, and how is the form being submitted.

I just did a quick test, and found that I can pass much more than 4095 chars from a text area via Method POST.

I gave up at over 12k chars.

These are my test files...

Launch Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <title> New Document </title>
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>

 <body>
  <form method=post action="http://localhost:8080/ibi_apps/WFServlet">
	<input type="hidden" name="IBIF_ex" value="chartest">
	<input type="hidden" name="IBIAPP_app" value="testing">
	<input type="submit">
	<br>
	<textarea name="lentest" rows="40" cols="160">12345678901234567890123456789012345678901234567890123456789012345678901234567890</textarea>
  </form>
 </body>
</html>


Fex:
-TYPE &lentest.LENGTH
-TYPE &lentest


Give it a go and see if it passes lots for you.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
On your job ID input page, you could request user initials or some other identification that would be unique to each user. Then use that information to create a uniquely named CVS (or other type) file in a special APP folder on your server.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
No need to get the user to input their initials, just use AJAX to get their userid - especially as the user has already had to login using their credentials. Use the URL http://[your server]/ibi_apps/WFServlet?IBIMR_action=MR_GET_DOMAINS&IBIMR_returntype=xml and then use a pattern of //CURRENT_USER to get the user id. Finally pass the value to a hidden variable so that it is included in the form execution URL.

Please note: I just know that some of you are going to cut and paste the above URL (with the server changed) to test it. This may give you an error code of 1032 because you're not logged into MRE.

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
Guru
posted Hide Post
Thanks for all your inputs. The form was built using Developer studio.

Reference: Usage Notes for STRREP Function
The maximum string length is 4095.

I use STRREP to get 'Job ID1' 'OR' 'Job ID2' 'OR' 'Job ID3' for mat before passing it to WHERE CLAUSE.


Thanks,
Sayed

This message has been edited. Last edited by: Sayed,


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
There are other ways to build the where clause.

For example, writing the variable to a file, Reading it with a TABLE connad and preparing the where clause or building a file that can be used in a JOIN.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Tony,

Users are not logging into MRE. All reports are run from the server. Users will log into our website but that credential do not get passed to WebFOCUS. WF client passes a generic userid/passd to Reporting server to run all reports.

Thanks,
Sayed


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
quote:
WF client passes a generic userid/passd to Reporting server to run all reports
Well that explains why you wont be able to use that then! How about capturing their IP address - unless you have dynamic IP addressing and they shut down inbetween entry and usage!

If you get the data entry into a file that you could use in MATCH -
MATCH FILE [user data file]
BY JOBID
RUN
FILE [your data file]
PRINT/SUM etc. ......
BY JOBID
AFTER MATCH HOLD AS ..... OLD
END

... should allow you to have a large number of JOBID entries by your end user.

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
<JG>
posted
Parse the input variable into a file and use WHERE IN FILE

 
FILEDEF XNCFILE DISK XNCFILE.FEX (APPEND
-RUN
-SET &INCFILE= '2,4,5';
-SET &CNTR=(&INCFILE.LENGTH / 2)+1;
-SET &TOKEN=0;
-REPEAT ENDREPEAT &CNTR TIMES

-SET &TOKEN=&TOKEN + 1;
-SET &VAR=GETTOK('&INCFILE.EVAL', &INCFILE.LENGTH, &TOKEN, ',',20, 'A20');
-WRITE XNCFILE &VAR
-ENDREPEAT
-RUN
TABLE FILE CAR
PRINT MODEL SEATS
WHERE SEATS IN FILE XNCFILE
END
 
 
Report This Post
Platinum Member
posted Hide Post
You can obtain the actual user id with the following:
-SET &UID = CNCTUSR('A8');
this gives you the id the user connects with, such as 'jsmith'

-SET &GUID = GETUSER('A8'); will give you the user id used to run the report,whatever you're using for your generic id -- ours is 'eda'.


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report This Post
Virtuoso
posted Hide Post
Seems like too much work to me. Push the stuff up to the foccache diretory to avoid file contention, and to retain it for subsequent requests. Then invoke something like:
<html>
<head>
	<title>Upload and execute</title>
	<script type="text/JavaScript">
				
		var $ = function(_id) {
			return document.getElementById(_id);
		};
		
		var wfApp = {
			runFex: function() {
				$('rand').value = Math.floor(Math.random()*1001);
				$('ibif_adhocfex').value = 
					"EX -LINES " + 
					((($('txtArea').value.replace(/\s+$/g,"")).split("\n")).length + 1).toString() + 
					" EDAPUT TXT,FOCCACHE/FILE,CV,FILE\n" +
					$('txtArea').value +
					"\n-INCLUDE somereportname";
				$('myForm').submit();
			}
		};
		
	</script>
</head>
<body>
	<table>
		<tr>
			<td>
				<form id="myForm" method="get" action="/ibi_apps/WFServlet" target="_blank">
					<input type="hidden" name="IBIF_adhocfex" id="ibif_adhocfex" />
					<input type="hidden" id="rand" name="rand" />
				</form>
				<textarea name="txtArea" id="txtArea" cols="60" rows="8"></textarea>
			</td>
			<td>
				<input type="button" style="width: 120px;" id="sub-button" value="Run It" onClick="wfApp.runFex();" />
			</td>
		</tr>
	</table>
</body>
</html>  


"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     [CLOSED] Import field value for reporting

Copyright © 1996-2020 Information Builders