Jump to content

goto specific layout in another file


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

Recommended Posts

Maybe I don't have the right approach for this... in any case, here it goes:

I want to go to a related file to a specific layout based on the value of a global field. The value of this global field can be changed by the user.

If the file was not already opened, I could have defined a "open" script and tested the global field, but since it is related, it is already opened and the script does not run everytime we go to the file.

If this is not clear, here is what is needed: the global field is "language", the user is allowed to toggle, the various layouts are in different languages.

I hope anyone of you can point me in the right direction.

Thanks!

Link to comment
Share on other sites

Thanks for your response.

My problem is not so much in finding what layout to open (my global field is accessible from both files) it is mostly about going from one file to the other and seeing the appropriate layout.

For instance, I'm in File 1, I am looking at the English screen, I switch to File 2, while in File 2 I decide I want to see the info in French: the next time I switch to File 1, I want to see the French screen (currently I see the English screen because this is the layout I was on when I "left" the file last).

To go from one file to another I use the script "Open" on a button. I wish there was a "Open x using layout y"...

Also I don't close the file when I "leave" it (the two files are related).

This should be simple right?

Link to comment
Share on other sites

Well I would hope that an obscure remark might cause you to think. Thinking is the hallmark of a developer.

I suppose that you would like the easy answer.

Ok. Try this. Open Scriptmaker in any db file. Read it.

You might be interested in the section under "Navigation". But that is just a wild guess on my part.

Link to comment
Share on other sites

To reliably change between databases, don't use Open [] script steps. Instead create a script in database "B" that goes to the desired layout etc and ends with the Refresh Window [bring to front] step.

In the database "A" make a script that externally runs the script you just made in database "B" -- the Perform Script [] step should be the last in the script

If you want to view a related record (or set) perform the Go to Related Record [] step before running the external script.

Link to comment
Share on other sites

Create a global text field in the other file.

Now create a script that copies the global field and performs an external script.

Now for the external script:

If the global field contents (from a popup list?) matches the layout names: In the other file, paste into the global field and go to layout [layout number from field...], and of course the global field is it.

Otherwise: Paste into the global field, then run a series of "If" statements to go to the correct layout based on the contents of the global field.

Link to comment
Share on other sites

Thanks Vaughan and danjacoby.

I can however be spared by the comments from Mr. Davie... Whenever I post here is because I have done some "reading" first and quite a bit of testing on my own. My question may have been too trivial for you, I thought it should be a simple thing to do, but I just could not see it...

I have found this forum really informative and generally people have been very generous of their time and expertise. It is an extremely valuable source of information for someone who does not have co-workers who understand FileMaker at the level found here. Please keep up the good work and keep the patronizing down...

Link to comment
Share on other sites

Keith, I gotta say, your attitude isn't very helpful. frown.gif

Fact is, nobody here knows everything there is to know about FMP -- including you. I, along with many others (too numerous to mention), answer far more questions than we ask. And we never berate someone for not being as advanced as we are.

Are you telling us you didn't do any work in FMP (or any other software, for that matter) until you knew it so well you didn't need to ask questions? Puh-lease! We all need help sometimes, and those of us who are still new to this software need help in areas that others of us find "old hat". If you're willing to be helpful, join in. But if you just want to be judgmental, may I suggest you take your soapbox to a street corner somewhere -- and not in my neighborhood?

Having engaged in banter with a number of other members over many and varied points, I'm quite certain I'm not alone here. I won't speak for anyone else specifically, but if you try to go head to head with me on this one, I'm confident that you'll find yourself in a very tiny minority.

In short, straighten up or ship out.

Link to comment
Share on other sites

I have to side with Dan on this.

A simple question is only simple if you know the answer. This, and other forums are there to provide a service. Somewhere that people can come to get answers to the problems that they are having.

I enjoy being a member of this forum and am honoured to be in such company as Dan and so many others who take the time out of our schedules to give help.

This is done freely and with no question.

I, and I am sure I am not alone here feel priviledged to be able to help out those that are just starting out in the world of FMPro development, or those that have just stumbled onto something that they cannot get their head around. I may have had to do certain things the hard way in finding a resolution to a problem, but I can then give something back in the form of an answer to those following after me.

This is a place where hopefully people will continue to come to receive good advice but with remarks such as you have made, this may turn them away.

Ours is not the question to decide what should be talked about or asked in these forums. If it relates to the product then they should feel able to ask away. I know I will always try to give my best.

I have never seen a question where someone has given an answer...but its simple. This brings me back to the beginning of this post.

It is only simple if you know the answer. And if we know the answer then let us give it to the person posing the question. If it saves them time trying to hunt around for the answer then so be it. They will ultimately learn something by doing what we suggest anyway.

I know I am only a recent member to this list, but I feel I am in good company here. The quality of the posts and their respective answers are insurmountable.

Link to comment
Share on other sites

Dan, sorry I've ruffled your feathers. Lighten up. Smile. Breathe deeply. I did not intend to berate anyone.

I gave a direct answer. I gave further information. The information I gave was good. The code for designating the layout is under Navigation. So is the advice to read the codes in ScriptMaker and learn their meaning good advice.

Yes I realize that many people who come here are new to this. I'm still learning as well. I never pretended to know it all. But I know that one must have a certain basic understanding of the application. I know there are books out there which are very helpful (because I made the time to read several cover-to-cover). And I know that the best advice is to first read at least one good book on the subject.

I also understand that a lot of people are given the task of becoming a FileMaker developer by a superior. It is not something they knowingly or willingly choose. Next thing they know they are in the midst of a complex development and have very little knowledge of the application. They feel under pressure to produce results for their superiors. They have not taken the time to read a book or to do much research. If they confront their superiors on this lack of basic knowledge and that it will take them some time to read some pertinent information, like a week or more, their superiors should understand that reality and allow for it. If their superiors don't get it, perhaps that person should look for some other employer who is more understanding and less abusive. If the bosses do not give you time to do the job right, where will the time come from to do it over?

I also realize that it is very difficult to just sit down and read all the daily threads on these forums, much less go back and read a year's worth on any one. And only sometimes can you find the right thread by the subject line. But one is still well advised to spend at least a half-hour a day in at least one of these forums.

While the humor of my direct answer went unappreciated, the direction and advice of my second response was correct. It is up to the person making the inquiry to make use of the good advice I give. I can't force them to do so.

No offense was intended. None should have been taken.

Link to comment
Share on other sites

Keith,

I think you should try to put on a different hat.

Take a look at your postings (not just for this thread, but others as well). They are very well worded and correct both factually and grammar-wise (maybe more so than mine, because I'm not a native speaker - I come from Sweden).

But the feeling I get from your postings is like if they were generated by a machine and not by a human. To most persons, they submit an undertone of disrespect. You suggest the following to mf:

"You might then consider editing so that you get the answers you desire by phrasing your questions more precisely"

Well, Keith, I think you should consider editing your postings so that you get people's respect and gratitude and not vice versa. If you are knowledgable in FileMaker, it is great if you contribute to this forum. But please do so in a manner that the great majority of all people visiting this forum can appreciate.

The number of posts replying to your postings following this thread might give you a hint that you should change the tone of your postings, don't you think?

Finally, I do think that you want to help, but you might not interpret your postings the way most people do.

Respectfully,

Daniel

Link to comment
Share on other sites

For DanielS:

Hear, hear!

And your English is excellent. It's better than most of the native English-speaking people on this BB. And considering that the average member here is probably of higher intelligence than the average person...

Dan

P.S. I believe the word you were looking for is "grammatically". wink.gif

Link to comment
Share on other sites

Sorry you did not like my answer. In the first instance you asked a question, just one, "This should be simple right? "

Fact is, I answered your specific question. Perhaps you should slow down a little bit and take a deep breath. Then you might consider writing your questions out in another format, going away from them for an hour or so, and re-reading your questions. You might then consider editing so that you get the answers you desire by phrasing your questions more precisely.

When you could not make sense of the fact that I had answered your specific question, my subsequent comments ultimately directed you to the proper source for the code you needed. From the information you had posted it did not appear that you were aware of that code. Ultimately my suggestion is that you (and other FMPro developers) should read all of these lines of code and become familiar with what they mean and do. Sure this takes time. Schedule it in. If your boss fails to grasp the need to learn what this stuff means, ask him or her how you are supposed to do the job? Take an attitude.

[ March 06, 2002, 12:56 PM: Message edited by: Keith M. Davie ]

Link to comment
Share on other sites

quote:

Originally posted by danjacoby:

For DanielS:

Hear, hear!

And your English is excellent. It's better than most of the native English-speaking people on this BB. And considering that the average member here is probably of higher intelligence than the average person...

Dan

P.S. I believe the word you were looking for is "grammatically".
wink.gif

Dan, thank you! Also for the correction.

Link to comment
Share on other sites

This topic is 7167 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
 Share

×
×
  • Create New...

Important Information

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