1 2 Previous Next 17 Replies Latest reply on Dec 1, 2013 4:17 PM by PeterGort

    Is it possible to automatically create a folder on the desktop with a FM field as name?

    john.s

      I'm trying to build my first FM database and it has a lot of components. One of the functions will be for photographers to create a Job when they do a photo shoot. The job might be a wedding, family portrait, or some activity for a high school to include in their year book. The Job name will be generated by the system using a calulated field combining an abreviation of the type of job )i.e., WED for wedding, YB for yearbook, POR for portrait...) the date, and some variable information depending on the type of job i.e., for action sports the two teams who played. So it might look like this "YB20131126 FB BFD vs GLFD" for a football game...or "POR20131126 Smith Family" for a Wedding. I think I have that portion figured out using the Case function. What I need to do next is take that Job Name and create a Folder on the computer desktop (or storage device) so the photographer can load the images into the folder. The two names have to match because that is how we will find these images a year from now when a client calls about them. I'd like to have the folder generated when the record is committed if possible. I can't find any way to do this and don't know if it is within the scope of FM.

       

      The case statement looks like this:

      Case (

      _fk_JobType = 1 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & Lookup(Customers::CustomerName);

      _fk_JobType = 2 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & "XXXXX This is unfinished I need to add coding for Leagues XXXXX";

      _fk_JobType = 3 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & _fk_SchoolCode & " " & JobNameAppendage;

      _fk_JobType = 4 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & _fk_SportTeamID & " " & _fk_SchoolCode & " vs " & JobNameAppendage;

      _fk_JobType = 5 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & Lookup(Customers::CustomerName);

      _fk_JobType = 6 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & Lookup(Customers::CustomerName);

      _fk_JobType = 7 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & "XXXXX This is unfinished I need to add coding for Events XXXXX ";

      _fk_JobType = 8 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & Lookup(Customers::CustomerName);

      _fk_JobType = 9 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & "XXXXX This is unfinished I need to add coding for College Sports XXXXX";

      _fk_JobType = 10 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & Lookup(Customers::CustomerName) & " " & JobNameAppendage;

      _fk_JobType = 11 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & JobNameAppendage;

      _fk_JobType = 12 ; JobType::JobTypeAbrv & " " & Year ( JobDate ) & Month ( JobDate ) & Day ( JobDate ) & " " & _fk_SchoolCode & _fk_SportTeamID & " TEAM";

      "I did something wrong"

      )

       

       

       

      Any suggestions??

       

      John

        1 2 Previous Next