ChuckL Posted November 1, 2007 Share Posted November 1, 2007 I have a very simple database with records containing only a reference number and a container field with a pdf (reference) in it. I want to use a script to search the file for the reference number, then when it finds it display the pdf file. It looks to me like the Open URL step should open the pdf file, but either I'm reading it wrong or I'm just not getting the syntax for the file path correct (I'm on a mac). No matter what I do it always tries to open a web site. Now, I know that's what you should expect it to do, but the Filemaker help file gives an example of using it to open Notepad to open a text file. I could just have them double-click the container field to have the pdf pop up, but it would be a lot nicer if the pdf would just come up by itself. Seems like this should be a simple thing to do, but I'm not getting it. Thanks for any help. Link to comment Share on other sites More sharing options...
bcooney Posted November 1, 2007 Share Posted November 1, 2007 Try the Export Field Contents script step. Link to comment Share on other sites More sharing options...
comment Posted November 1, 2007 Share Posted November 1, 2007 You CAN use Open URL[], but you need to (a) extract the absolute reference out of the container field, and (: change the URL protocol from whatever it happens to be into "file://". The following would work (on a Mac) with contents inserted as file, reference only: Open URL [ Substitute ( GetValue ( YourTable::ContainerField ; 2 ) ; "filemac:/" ; "file://" ) ] A simpler way is to have a script simulate a double-click by using the Go to Field{} script step, with "Select/perform" checked. Link to comment Share on other sites More sharing options...
ChuckL Posted November 2, 2007 Author Share Posted November 2, 2007 Thank you both for your replies. Simple is usually better so I tried it (Go to Field[select...]) first and it works great. Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6147 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 accountSign in
Already have an account? Sign in here.
Sign In Now