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

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

Recommended Posts

Posted

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!

Posted

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

Posted

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 ;)

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