Jump to content
Sign in to follow this  
JH Howland

How to Preset Next Filemaker "Open File" directory?

Recommended Posts

After my Windows 10 based Filemaker Pro 11 MarinaPro Solution is launched (Path = C:/MarinaPro/Marina.fp7), I need to create a variable ($$source = filewin:/C:/MarinaPro/ResScheduler/) to a revised default "Open File" path.  Because I need to select from several reservation request attachment Excel .csv files, placed in the ResScheduler directory by an Outlook 2010 Macro, my "Import Records" script is set with an "unspecified" data source.

When my script is activated with Error Capture "Off", I get the obligatory Filemaker Pro Error message, "The file <unknown> could not be found..." and the "Open File window is still set to "Look in: "MarinaPro" (Default).  And, of course with Error Capture "On" there is no Open File window presented.

I have to manually select and import the first Excel.csv file before the default directory becomes "ResScheduler".

I want my default "Open File" "Look in:" directory changed from "MarinaPro" to "ResScheduler" before I open the first Excel.csv file.

Is there a way, nothing I have tried is working.

Import.pdf

Edited by JH Howland
Attach Script, Revise Title

Share this post


Link to post
Share on other sites

I would use Get( DocumentPath ) and put MarinaPro and ResScheduler in that folder; not sure why you need your app at the root level.

 

custom function docPathMarinaPro = Get( DocumentPath )  & "MarinaPro/"

custom function docPathMarinaProDo = Get( DocumentPath )  & "MarinaPro/do/"

custom function docPathMarinaProTmp = Get( DocumentPath )  & "MarinaPro/doing/"

custom function docPathMarinaProDone = Get( DocumentPath )  & "MarinaPro/done/"

 

custom function docPathResScheduler = Get( DocumentPath )  & "ResScheduler/"

.

.

.

 

and inside each of those folders I would put do, doing, done

where "do" is the write folder for Outlook 2010

*"doing" is where your parser moves the file it's currently working on; a temp directory in other words

and "done" is where the file is moved after the parsing has been done completely.

 

*doing could of course be named "In process," but I like the way it's sorted when named doing.

 

As pr example:

Quote

$ exa -lT MarinaPro
drwxr-xr-x - user 23 Dec 19:16 MarinaPro
drwxr-xr-x - user 23 Dec 19:16 ├── do
drwxr-xr-x - user 23 Dec 19:16 ├── doing
drwxr-xr-x - user 23 Dec 19:16 └── done

 

Quote

$ exa -lT ResScheduler
drwxr-xr-x - user 23 Dec 19:16 ResScheduler
drwxr-xr-x - user 23 Dec 19:16 ├── do
drwxr-xr-x - user 23 Dec 19:16 ├── doing
drwxr-xr-x - user 23 Dec 19:16 └── done

 

Edited by ggt667
Increased legibility through spacing

Share this post


Link to post
Share on other sites

Sorry I didn't originally specify "Windows 10" based.  Also, attached the import script I am testing.  I am not really understanding your solution?

I simply want the default Filemaker "Open File" directory changed from "MarinaPro" (set at solution startup) to "ResScheduler" (where .csv files reside) before I start manually importing from selected individual files.

Share this post


Link to post
Share on other sites

Now that must be an OS setting, no? I would imagine you can set the OS to open recent folder.

 

Why not just drag your desired folders into the side panel? 

 

Edited by ggt667

Share this post


Link to post
Share on other sites
2 hours ago, JH Howland said:

I have to manually select and import the first Excel.csv file before the default directory becomes "ResScheduler".

You could have a script do a dummy import of a dummy file located in the the ResScheduler directory.

Alternatively, use the BaseElements plugin to select the file:
https://baseelementsplugin.zendesk.com/hc/en-us/articles/207324927-BE-FileSelect

 

---
This is a cross-post:
https://community.filemaker.com/thread/193614

Edited by comment

Share this post


Link to post
Share on other sites

So far no joy, I guess I have not explained my need well enough.  I am wanting to reset the currently set directory (folder) last opened to import a file.  I am not interested in the "files" right now, I am only working with the "folder" (directory).

I want the Windows (not Mac) Filemaker Pro 11 Advanced current default "Open File, Look in:" directory changed from "MarinaPro" (folder set at the solution startup) to "ResScheduler" (folder where the .csv files reside) before I start manually importing from the ever changing quantities of individual reservation attachment .csv files added by an Outlook 2010 Macro.

I am hoping a custom function like, but not having anything to do with Get(DocumentsPath), might work.  Something, for example like Get(DirectoryPath).  I think this may have been addressed in a later version of Filemaker, not sure.

Edited by JH Howland
Spelling

Share this post


Link to post
Share on other sites
55 minutes ago, JH Howland said:

I guess I have not explained my need well enough.

I think you have.  When you import - either manually, or scripted with dialog - Filemaker will open the last folder used for import (or perhaps the last folder use to locate a file for any purpose - I am not 100% certain about that). So the only way to force Filemaker to open the folder you want, is to import from that folder first. Or use another tool.

 

55 minutes ago, JH Howland said:

So far no joy,

I am not sure what to make of this.  Have you tried either of the two suggestions? If yes, what specific  issues have you run into?

 

 

Edited by comment

Share this post


Link to post
Share on other sites
On 12/24/2018 at 11:10 AM, comment said:

I think you have.  When you import - either manually, or scripted with dialog - Filemaker will open the last folder used for import (or perhaps the last folder use to locate a file for any purpose - I am not 100% certain about that). So the only way to force Filemaker to open the folder you want, is to import from that folder first. Or use another tool.

I am not sure what to make of this.  Have you tried either of the two suggestions? If yes, what specific  issues have you run into?

I have tried it all, and then some.  I am at the conclusion as stated above, "Filemaker will open the last folder used" - to Open a file.  It appears that I am stuck with that result.  I'm done.

Share this post


Link to post
Share on other sites
On 12/26/2018 at 9:37 PM, JH Howland said:

  I am at the conclusion as stated above, "Filemaker will open the last folder used" 

Well, if you agree that Filemaker will open the last folder used, then obviously the solution is to make the folder you want to be opened the last folder used. So run a script that uses it, before asking Filemaker to open a folder. That's what I've been trying to tell you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By FMRadio
      Basic Question:
      I am attempting to import 60 records from a CSV file. There are 4 fields per record: First Name, Last Name, Email and Source. 
      When I choose Import Records... > File... from the File menu, everything looks good, 4 data points point to the correct field names: arrow icon "Import this field" but the rest are the double dots icon, "Don't import this field," and when I click on the Import button only the first record is imported.
      I don't use Filemaker frequently enough to remember everything but when I need it, I really need it. I do not remember having to go thru and changing every icon in the Import dialog to import this field, I thought that was automatic.
      I there something missing in the CSV file? I can reprocess that if required. Having to indicate to import for every record will be tedious.
      Thanks in advance for any help.
       
    • By ZoinksScoob
      I just upgraded my Mac OS to Mojave (10.14.4).  I am running FMP Advanced 11.0v4, and my databases are in FP7 format (due to a legacy system at work.)  I now have a repeatable "glitch" where if I perform a find in a database and there are no records that come up as results (i.e., no records match the find), regardless which choice I make next (Cancel or Modify Find), the app quits and I keep getting the window to send the issue to Apple. I can immediately re-open the database, though usually the last 2-3 changes I made weren't saved.  Other than the obvious option of upgrading the app, does anyone know of a workaround for this? Thanks in advanc.
    • By JH Howland
      Filemaker Pro 11 is running on two Windows 10 computers connected as Host and Client over a network.
      The script to import data from an Excel .csv file utilizes the following script step options:
          1. Un-Checked - Specify data source - File
          2. Check - Specify import order, Import Action
              a. Select - Update existing records in found set
              b. Check - Don't import first record (contains field names)
          3. Check - Perform without dialog
      When the Import script is run from the Host computer, and the desired .csv file is manually selected, the Excel first row field names are not imported and the second row with the data is imported as expected. (See Host Import Mapping)
      When the same script is run from the Client computer, the Excel first row field names are imported and not the second row data.  To get the proper result, I have to leave the check box for "Perform without dialog" unchecked and then manually, from the "Import Action" group, check the box for "Don't import first record (contains field names)" to get the proper data imported. (See Client Import Mapping, check box is no longer checked)
      Is this caused by a defect in FMP 11?  I can't figure out why this is happening.


    • By transpower
      I've updated my computer from Windows 7 Pro to Windows 10 Pro.  My FileMaker Pro Advanced 11 does not launch.  I get the message "The application has failed to start because its side-by-side configuration is incorrect."  What's the solution for this issue?
      Update:  I clicked on an fp7 file, and then Windows asked me to insert the FileMaker CD, which I did.  Some files were quickly copied over, and everything works fine now!
       
    • By JH Howland
      I have several customers that utilize our MarinaPro Marina Dockage Management solution.  All are running Windows 10 Pro 64Bit and Filemaker Pro 11.0v2.
      All the MarinaPro solutions are functioning well with exception to the one marina that is using an HP LaserJet Professional M1217nfw MFP printer.  The printer has been named "HP LaserJet".
      The problem is that scripted reports will not print after an updated/revised solution is installed on the computer.  However, a test page can be printed from the Windows default printer.
      Print scripts are utilized by more than one report and this sample is named -  "Master Portrait Printer | Current Record | All | 1 |" and is formatted as:
      #Used by: Print Float Plan Form
      #Used by: Toggle Printer Mode
      #Portrait Orientation
      #Print: Current Record | Print Range All | Copies: 1
      Print [Restore: HP LaserJet; No dialog]
      Filemaker Help states, "If you do not specify an output destination before saving the script or 'if the specified printer cannot be found' when the script executes, the 'output from the script step is sent to the user’s default' printer."
      It appears that the "specified" printer is not being found and the output from the script is "not" being sent to the user's default printer.
      However, if I "re-specify print options" and "Save" the script it will start working again.  And now I am unclear whether it is actually finding the FMP "specified" printer or the Windows "default" printer.
      Any ideas why this occurs?
       
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.