Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4629 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Dear Programmers,

I want to display files for each record separately on the layout which are related to them.

I have added a container, browse button to upload and a web viewer on the layout.

Browse button will browse for file and put it into container field then will export the contents to a folder which is associated with that record number.

All the files are saved to-> \\server\attachments\{record-number} i.e. Record 1234's files will be in this folder -> \\server\attachments\1234

I am doing it this way:

Send Event [ open document/application; "cmd /c \\server && cd\Attachment && md" & Table::RecordNumber ]

Insert File [ Table::Attachment ]

Set Variable [ $attachment; Value:Table::Attachment ]

Set Variable [ $output; Value:"filewin://server/Attachment/" & Table::RecordNumber & "/" & $attachment ]

Export Field Contents [ Table::Attachment; “$output” ]

Set Field [ Acceptance::Attachment; "" ]

The problem I am facing is:

1. CMD does not support UNC paths as current directories. (\\server) - So how would I be able to create directory in my required location.

2. How can I put an IF statement to check if the directory exist or not, if not then create it before exporting the field contents.

Any suggestions?

This topic is 4629 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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