October 1, 200520 yr Here's the scenario: One table with a container field that holds either a file or a file reference, a text field that contains the file path to the file, and a text field called publish that returns the values "Yes" or "No". If this last field has the value "Yes", then that record will be accessible through IWP and must contain the actual file in order to allow file downloads. If "No", then just a reference is stored. The stumbling block I'm running into is being able to insert the file (or replace it with a reference) without the user having to do much more than change the value in the publish field. So far I've tried by making the container an auto-enter calculation based on the file path but that just sets a reference. I've tried scripting but I can't figure out a way to specify the file path via calculation to insert a file. Does anybody know a user-friendly way of handling this? Thanks in advance for any help you can offer!
October 1, 200520 yr In 8 the "insert File" dialog can take a variable. so you can calculate the path the file in "fm-ese", put it in a variable and use the "insert file" script step to insert the file based on the path in the variable. (See attached demo) No such thing in 7 unless you hard code a path/filename in the Insert File script step and use OS level scripting to move and rename the file to match the hard coded path & filename in the script before calling the script. test_insert_file_variable.zip
October 1, 200520 yr Author Thanks Wim, that's exactly what I'm looking for. I'm glad to see that FMP8 has that capability. I just wish it was possible in 7 ;)
Create an account or sign in to comment