This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 28, 2011, 9:41 AM
261 Posts

Re: Write content of a computed field to a file

  • Category: Other
  • Platform: Linux
  • Release: 8.5.2
  • Role: End user,Administrator
  • Tags:
  • Replies: 5
Hi Chris,
 
First of all, the code  is running on you (Linux) server, so you should look over there to find the file.
 
Second, you say you're server is on a Linux box. I'm no Linux guru, but AFAIK Linux doesn't have a "c drive". Try modifying the row in which you create a filepath to (for instance):

var outPath:string = "/local/" + @Name('[CN]',getComponent("username1").getValue()) + ".txt";
 
After you've clicked the button, the file should be in the /local directory on your server.

Try searching Google for more information about the Linux file system.
 
Mark
May 28, 2011, 11:06 AM
35 Posts
Re: Write content of a computed field to a file
 Thx for you reply Mark,
 
That's what I though, I also tried to run the code client side, but without results. (I took a look on my linux server and found my files in the notes data directory)
 
How can I save the file on the client local c:\ drive of the xpage user? (local machine)
 
I don't want the file to reside on the server. 
 
Best regards, 
 
Chris 
May 30, 2011, 7:09 AM
261 Posts
Re: Write content of a computed field to a file
You could write an XPage that writes a file back to the user's browser. The user will then be prompted to save the file somewhere on his computer.
 
Have a look at this blog entry I wrote to get you started: http://www.bleedyellow.com/blogs/m.leusink/entry/serving_binary_files_through_xpages_and_a_save_as_dialog_if_you_want_to
 
Mark
May 30, 2011, 11:54 AM
35 Posts
Re: Write content of a computed field to a file
Thx Mark,
 
I'm going to try that out, but your link isn't working... 
 
I can only access www.bleedyellow.com !
May 31, 2011, 7:48 PM
261 Posts
Re: Write content of a computed field to a file
The site has been down for maintenance from time to time for the last couple of days. Has probably to do with the upgrade they did of the Connections version its running on.
 
I just checked it and can access the site again.

Mark

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal