Jump to content

Variable to decide source file for image


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

Recommended Posts

Hi All,

I can never seem to get my head around file paths and even more so when we need to use variables. Can any of you help me with the following please?

What I have is an inventory system that has been adapted from the starter solutions, I have created a new field called colour.

I have a folder system set up with lots of different colour folders i.e. black, blue, yellow etc...

I would like to add a button that performs a script that goes to the correct colour folder so that I can select the correct part. The folder path containing these colours would be "/Users/USERNAME/Documents/FOLDER/FOLDER/FOLDER/FOLDER/HERE ARE THE COLOUR FOLDERS" if that makes sense....

I know this involves a variable using the colour field but cannot get my head around it.

(I am aiming to then further this later on by being able to go straight to the part code within that folder without having to manually select one. I think I will be able to complete this once I have got used to doing the first part)

Thank you to everyone who can help.

Link to comment
Share on other sites

16 minutes ago, Nathan Wilcox said:

a script that goes to the correct colour folder so that I can select the correct part

Please explain what you mean by "select the correct part". Select for what purpose?

 

16 minutes ago, Nathan Wilcox said:

to go straight to the part code within that folder

This too requires the same explanation.

--
P.S. Please update you profile to reflect your version and OS.

 

See also: http://fmforums.com/topic/79551-open-calculated-file-directory/?do=findComment&comment=370547

 

 

 

Edited by comment
Link to comment
Share on other sites

You still haven't answered my question: select for what purpose?

it looks like each "part" in your solution has an external file in a known folder, with a known filename. Why don't you simply add a calculation field with the result type being a container, and calculate the path to the relevant file? Then you will be able to open the external file by double-clicking the container field.

Alternatively, you could use the OpenURL[] script step to open the external file directly (again, using the path calculated from the path to the folder and the filename). Or use AppleScript to do the same.

 

Edited by comment
  • Like 1
Link to comment
Share on other sites

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