Jump to content
Server Maintenance This Week. ×

Button navigation fail


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

Recommended Posts

Hi all,

I have a pretty simple navigation scheme with six buttons that are attached to this script:

 

Go to Layout (Get (ScriptParameter))

 

I pass the name of the layout as the script parameter and it takes me to the corresponding layout. This works for five buttons, but one refuses to do anything. I've been tearing my hair out and squinting at the screen, trying to find a typo in the script parameter or the layout name, even deleted and carefully retyped, but it all looks good to me.

The only thing that was different is the fact that I've added that particular layout after the button was already on the other layouts, but I can't see how that would make a difference.

Btw, the offending layout name is "inventory", in case there's anything wrong with that.

Thanks,

Stefan

 

Edited by stefangs
Link to comment
Share on other sites

20 minutes ago, comment said:

I don't see the problem: clicking the "inventory" button, from any layout, takes me to the layout named  "inventory".

What? When I click 'inventory', nothing happens. I swear! Do you believe me or should I make a video?

I'm stumped.

Link to comment
Share on other sites

Are you really on version 13?  Added: And if you use a custom function, you'll need to provide it in the file and refer to that in your script parameter so we can see what you are ACTUALLY doing. 🙂

Edited by LaRetta
Link to comment
Share on other sites

13 minutes ago, Steve Martino said:

I stopped hard-coding names in script parameters after I read this article:
http://www.philosophyoffilemaker.com/robust-filemaker-design-87

opting instead to use the custom function:
getLayoutName to get the internal ID number of the layout

There's always a more elegant way, but the first sentence in that article sums it up for me:

>>Have you ever inherited a system built by someone else, changed a field’s name and everything stopped working?<<

I don't work on other people's files and nobody works on mine, so I can live with that. It is just so nice and easy.

2 minutes ago, LaRetta said:

Are you really on version 13?  Added: And if you use a custom function, you'll need to provide it in the file and refer to that in your script parameter so we can see what you are ACTUALLY doing. 🙂

Yes, v13 and no custom function.

Link to comment
Share on other sites

9 minutes ago, LaRetta said:

Disable the Go To Object[] in your script and then save the script.  Does it work for you then?

No, that step was added later. The script didn't even work for me before I added that.

So since it appears that this script works for everyone but me, it must be something peculiar in my setup. Could it be useful to reinstall FMP?

Link to comment
Share on other sites

Then I don't know. Ostensibly, if the same file behaves differently on two systems, then the problem is with the system, not with the file. However, I have never encountered this kind of problem. 

A shot in the dark: do you have any system-enhancing utilities installed? Perhaps one of them is interfering.

 

Link to comment
Share on other sites

7 hours ago, stefangs said:

Did that - same thing.

Have you debugged the process? Ie, open the debugger, then step through each script step after you pressed on the button. This allows you to view values in the fields/variables and determine whether they are as expected. Keep an eye on the bottom of the debugger for any errors.

Link to comment
Share on other sites

3 hours ago, OlgerDiekstra said:

Have you debugged the process? Ie, open the debugger, then step through each script step after you pressed on the button. This allows you to view values in the fields/variables and determine whether they are as expected. Keep an eye on the bottom of the debugger for any errors.

The script is only 1 line :-)

5 hours ago, comment said:

Then I don't know. Ostensibly, if the same file behaves differently on two systems, then the problem is with the system, not with the file. However, I have never encountered this kind of problem. 

A shot in the dark: do you have any system-enhancing utilities installed? Perhaps one of them is interfering.

 

Not that I know of. It's just a plain vanilla installment. I will try to install on my wife's laptop which is similar and see if it works there. Thanks much,

Link to comment
Share on other sites

Just to wrap this thing up (hopefully), I have renamed the script parameter and layout name from "inventory" to "inventoree". Now it works. But changing it back to "inventory" breaks it again. It's almost like "inventory" is a reserved word.

So "inventoree" is it then. The word never shows to the user, so I suppose I can live with it.

Thanks all for your help and checking out the file.

Link to comment
Share on other sites

I have 6 layouts, only one is called inventory, although it's inside a folder also called inventory, but that applies to other layouts in a similar fashion as well. Also, it seems to work for the folks here who tried my file, but not on mine.

Link to comment
Share on other sites

8 hours ago, stefangs said:

I have 6 layouts, only one is called inventory, although it's inside a folder also called inventory, but that applies to other layouts in a similar fashion as well. Also, it seems to work for the folks here who tried my file, but not on mine.

Most people here are testing with newer versions. Just to rule it out, rename the layout folder to something different and see if it works. I vaguely remember  an issue with layout folder names being the same as layout names, being the reason why I never name folders the same as layouts.

It may be a case where the other layouts were created prior to being stored in folders. You probably created the folder first, then the inventory layout, as that structure was already in place. It's possible the order of creation is significant.

This post deals with similar issues:

https://community.filemaker.com/en/s/question/0D50H00006h92UZSAY/psa-fieldnames-function-affected-by-layout-folder-names

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

You guys are awesome. This was, in fact, the problem! I have renamed the folder and then the layout back to inventory. Now it works! Incredible.

The odd thing is, that I am doing the exact same thing with the other layouts which also have folders with the same name. For some reason, it didn't choke on them, only with 'inventory'. The only difference I can see is that, up to now, the inventory folder only contains a single layout.

Whatever the reason, I'm very happy that the problem was found. Thanks so much!

Link to comment
Share on other sites

1 hour ago, stefangs said:

The odd thing is, that I am doing the exact same thing with the other layouts which also have folders with the same name. For some reason, it didn't choke on them, only with 'inventory'.

It could be a matter of which was created first (or last?) and took over the spot that intercepts all the calls. Since we are dealing with a bug that was apparently fixed in later versions ...

 

Edited by comment
Link to comment
Share on other sites

True - that layout was created last, so that would make sense, as far as a bug can make sense.

Unfortunately, I missed the upgrade phase after v13, so I will need to get a full version again. Pretty stiff upgrade policy, but that's not really a complaint.

Link to comment
Share on other sites

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