Jump to content
Sign in to follow this  
satyam

insert a file into container as a reference and store the file in a remote folder

Recommended Posts

i need help on insert a file into a container as a Reference and store the phyical file to the remote folder. i am new to the FM and trying and getting any idea . Pl help me asap.

Thanks,

Satyam.

Share this post


Link to post
Share on other sites

Where is the original file? On the user's local machine? Where is the remote volume. Is it a shared volume or an ftp server?

What have you tried? What problem did you have? Have you read any of the user guide? Seriously, you have to do a bit of work before posting, and tell us more than the quick comment.

Edited by Guest

Share this post


Link to post
Share on other sites

Where is the original file? On the user's local machine? Where is the remote volume. Is it a shared volume or an ftp server?

What have you tried? What problem did you have? Have you read any of the user guide? Seriously, you have to do a bit of work before posting, and tell us more than the quick comment.

Orginal file is at User desktop(local Machine) and renote drive is a shared drive from the server and the every user wants to insert their own files.

Share this post


Link to post
Share on other sites

Orginal file is at User desktop(local Machine) and renote drive is a shared drive from the server and the every user wants to insert their own files.

Share this post


Link to post
Share on other sites

You'll need to Insert File into a container.

Insert File Help

Then, Export Field Contents to push the file to the server.

Export Field Contents

Then, use Set Field to set the container field to the new file path.

The path to the server will need to be consistent. The process can be completed scripted.

Share this post


Link to post
Share on other sites

Thanks for the info.

I want to do a similar thing with images. However, when I set the container field to the filepath my layout only displays a generic jpeg icon and not the image. What am I doing wrong?

Share this post


Link to post
Share on other sites

When I export the image (on a Mac) to $FilePath, it somehow looses it's jpeg'ness. When I subsequently set the container field to the $FilePath, it treats it as a generic file insert. This displays a generic icon instead of the image for the container field.

When I manually insert the image from the original jpeg file (not $FilePath), everything is OK.

When I manually insert the image from the exported file $FilePath, only the generic icon displays.

Export Field Contents (Table::Image, $FilePath)

Set Field (Table::Image, $FilePath)

What am I doing wrong?

Share this post


Link to post
Share on other sites

My requierment is here.

User Side:

1.User select any file from desktop and insert.

My side:

2. I need to insert the file as a reference

3. and Store the Physical file to the Remote Shared Folder.

can i use the same for this?

Share this post


Link to post
Share on other sites

the path should start with image: not file:

Share this post


Link to post
Share on other sites

I don't have a shared volume to push a container to, so I can't really do a good demo.

Why don't you post what you have and I'll take a look?

Share this post


Link to post
Share on other sites

#User prompted to insert file

Insert File [ ImageTest::Doc2 ]

#If user inserted file, export to remote folder

If [ not IsEmpty (ImageTest::Doc2) ]

#obviously, the $exportPath must be set to the remote volume's path.

Set Variable [ $exportPath; Value:"//filewin::P/computerName/shareName/directoryName/ & GetasText(Doc2)" ]

Export Field Contents [ ImageTest::Doc2; “$exportPath” ]

#set container to export path

Set Field [ ImageTest::Doc2; $exportPath ]

End If

Share this post


Link to post
Share on other sites

Insert File [ Attachments::attachment ]

Set Variable [ $exportPath; Value:"//filewin::P/M:/2 PM Doc/2 Scope/Change Control/Change Control Documents Archive/ & GetasText(Attachments::attachment)" ]

Export Field Contents [ Attachments::attachment ; “$exportPath” ]

Set Field [ Attachments::attachment ; $exportPath ]

and getting the following error:

"GetasText(Attachments::attachment)" coud not created on this disk. Use a different name, make more room on the disk, Unlock it or use a different disk.

Share this post


Link to post
Share on other sites

i changed the memory to 256 in the preperences and its working fine. but the problem is taking the orginal filename while exporting.

here is my script:

"filewin:/M:/2 PM Doc/2 Scope/Change Control/Change Control Documents Archive/ Test.txt"

how can i add the selected filename(with Extension) to this exported path.

i am waiting for your reply

Share this post


Link to post
Share on other sites

got it working fine with this and how to set the file as a reference.

Share this post


Link to post
Share on other sites

You are answering your own questions. I've lost track, do you still have an open question? Is the Set Field step not working? That sets the path in the container, and so the file is stored as a reference.

Share this post


Link to post
Share on other sites

Thanks, that was exactly the problem.

After I changed the path text to begin with "image:" instead of "file:" everything worked.

Thanks again.

Share this post


Link to post
Share on other sites

i am sorry boss.. its working fine with small modifications to your code and thank you so much for your postings. if i need any thing.. i will keep posting on the same thread pl reply me if you know. Thanks alot

Share this post


Link to post
Share on other sites

Here is the small change to your code and its workig fine for any kind of file..

"filewin:/M:/2 PM Doc/2 Scope/Change Control/Change Control Documents Archive/" & $filename

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    JonnyVirgil 
×

Important Information

By using this site, you agree to our Terms of Use.