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

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

Recommended Posts

Posted

I have a container field that contains a referenced file, and I have an OPEN button that will open that file by using the Go to Field command. However if the OPEN command is unable to find the referenced file because the user is not connected to our server I would like Insert File dialog NOT to appear. Is there anyway to trap for this, because it is only a one line script?

Thanks

David

Posted

I have a container field that contains a referenced file, and I have an OPEN button that will open that file by using the Go to Field command. However if the OPEN command is unable to find the referenced file because the user is not connected to our server I would like Insert File dialog NOT to appear. Is there anyway to trap for this, because it is only a one line script?

Thanks

David

IsEmpty (Container)??

Presumably if the reference file cannot be found your container would be empty, otherwise GetAsText(container) might report "FileMissing", or similar.

Posted

No the container file is not empty. The issue is that the use may not be connected the server because they are off location (these are only referenced files).

Posted

I would insert a new line of text in the container field, giving it a local address.

I'm going to explain better myself.

1) If a container contains a referenced file, it can be managed much like a TEXT field.

2) If that "special" text field contains TWO paths and the first one isn't reachable, the second one is than searched.

So, if GetAsText ( container ) gives NOW something like:

File:/a.txt

FileWin:/C/aaa/bbb/a.txt

you can set that field to contain:

File:/a.txt

FileWin:/C/aaa/bbb/a.txt

FileWin:/C/aaa/xxxxxxxxxxxxxx/z.txt

and the last file will appear into the container ONLY when yhe first file is missing.

Posted

the last file will appear into the container ONLY when yhe first file is missing.

That's a nice idea - but then clicking the "Open" button will open the default file.

if the OPEN command is unable to find the referenced file because the user is not connected to our server I would like Insert File dialog NOT to appear. Is there anyway to trap for this, because it is only a one line script?

Make it a two-line script, with the first line being Set Error Capture [On]. You will still get an error message, but the Insert File dialog will not follow.

This topic is 4961 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.