April 28, 201114 yr 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
April 29, 201114 yr 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.
April 29, 201114 yr Author 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).
April 29, 201114 yr 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.
April 29, 201114 yr 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.
Create an account or sign in to comment