Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FMP Advanced 11 - Renaming files and losing script function

Featured Replies

Peoples ~

I need help - I am ready to catapult my laptop through my sliding glass door.

I have a solution which includes 50+ data bases which all inter-relate. This solution has worked almost flawlessly for 12 years. I have a navigation (moving from one module (contacts, shipping, work order, etc) to the next) menu which allows the user to quickly access a chosen module.

I have attached a .pdf of screen shots working through script debugger and my data sources. For the life of me I can not figure out why the original solution works without exception and the renamed files through Developer tools do not.

What am I missing?Screen Shots.pdf

Using the developer utilities to rename the files is supposed to prevent exactly this problem, so it is puzzling. I would say, looking at your file paths, that if the files are all in the same folder, you should get rid of the C:/ and Z:/ paths and simply use the relative path for all files (file:yourfile.fp7).

What happens when you step through the navigation with the debugger?

  • Author

Fitch ~

Nothing happens...sadly. I did attach the .pdf which shows what the screen did in the renamed solution per script step and what the original solution did in each script step. The original solution moved to Employee File on Step 3 of the script (as it should) - where the renamed solution went through each step with an error code 112 (missing window) error message because the file was not opened in step 3 of the script.

I will certainly do the clean up with the c: and z: issues - but technically shouldn't fm step over these once it has found that the file is missing?

Another interesting note: I have a short cut on my desktop called "launch" - where the opening script is housed. It says it can't find "menu" - I point it to it in the solution file - it launches. Next time I open "launch" it asks for the path again... seems related to my path issue - but not sure how. Aghh. With all files within the same "file" - should be a no-brainer to go find them.

Looking at it again, your Select Window step has a hard-coded string "Employee File" -- that string will NOT be updated via the developer tools, you have to do it manually.

I'd recommend that you put a script step in the Open Employee File script to select the current window (i.e., the Employee File), as opposed to in the parent script. Or you could exit the Open Employee File script with the window name, and then use that script result in the Open Employees script.

First thing is to clean up the external file references so that they are all in the format

file:filename

Nothing else is needed, no paths, no folders, nothing.

Secondly, make sure the file names have no periods in them such as "contacts 2.0.fp7" because the Get( FileName ) function breaks and returns the wrong string as the file name. Don't wait for FMI to fix the function (they seem to like it the way it is) change the file names.

I'd recommend that you put a script step in the Open Employee File script to select the current window (i.e., the Employee File), as opposed to in the parent script.

Ditto that.

  • Author

Fitch and Vaughan ~

Many thanks to both of you! Works like it should. I admit I feel a bit sheepish as it was such a simple fix and should have been done in the initial development - don't have a clue what I was thinking back when programming in FM3 :). Again, thank you for your help, guidance, and solution.

James

Back in FM3 you wouldn't have needed that Select Window step -- the file running a script would come to the front whether you wanted it to or not.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.