Jump to content
Server Maintenance This Week. ×

FMP Advanced 11 - Renaming files and losing script function


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

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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