CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Dynamically changing upload folder

Print topic Send  topic

Author Message
maggiemel

Posts: 75
Posted: 04/06/2005, 8:35 AM

Hello again, everybody.

I user the example in the CCS Help to dynmaically change my upload folder based on whether or not a file is restricted to certain users. Works great.

When files are uploaded to this special folder, however, rather than the default location, the file name does not display in my record form. Is there something I can do in the before show event of my record form to show that the file exists in the alternate folder? Currently, the upload box shows but no file name -- so it looks like no file exists for that entry.

Appreciative, as always,
Melissa
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
Nicole

Posts: 586
Posted: 04/07/2005, 1:54 AM

Melissa,
As I understand the Record form contains File Upload component. In this case you need to change File Folder in page’s After Initialize event.

_________________
Regards,
Nicole
View profile  Send private message
maggiemel

Posts: 75
Posted: 04/07/2005, 7:00 AM

Nicole, I can't make it work, but maybe I'm not using the right language. In After Initialize event I've tried:

If Form.Control.Value = "Group B" Then
Form.FileUpload1.FileFolder = "d:/dir_b/"
End If

This is the language I use in the "Before Process" event which works to direct the file to the proper directory on upload (insert or update). What I'm trying to do now is display the file name of the already uploaded file. If it goes into the default location (dir_A), it shows up fine. If it goes into the alternate directory, then nothing shows up when the record form is displayed.


_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
maggiemel

Posts: 75
Posted: 04/07/2005, 7:20 AM

Ugh, I can see that my problem is actually bigger than what I'm describing. If I upload to this alternate folder, it works initially, but then not only does the file name not display, but if I delete the entry from the database, the document is not deleted from the alternate directory folder.

What I need it a solution to change the upload location based on the value of a radion button on my record form. Not only for the initial insertion, but for every subsequent display / action of the record form. Can you help me figure out how to do this? I'm about to search out the forums to see if anyone else has had a similar situation.

Many thanks.
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
Nicole

Posts: 586
Posted: 04/08/2005, 1:41 AM

Melissa,
As I see the problem is that File Folder is not changed on page load. It happens because Form.Control.Value returns empty string in page’s After Initialize event, this values is just does not exist in the time the event fired.
If you really need to use Form.Control.Value to set File Folder you need to retrieve this value from a table, you can use CCDLookUp() function to get this value
http://docs.codecharge.com/studio/html/ProgrammingTechn...BValue.html?toc

_________________
Regards,
Nicole
View profile  Send private message
maggiemel

Posts: 75
Posted: 04/08/2005, 6:18 AM

Nicole, thanks -- I get it now and the form is working as it should.

Many thanks!
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
test
Posted: 04/09/2005, 2:20 PM

:-{} dds

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.