Using FM Server 7, need script to choose right layout.

Hi all,
Once agian, I have run into t problem. I have finally got a hold of how to do things in FM 7 Server using Custom Web Publishing but I am still running into a problem. I have a script that works properly in the database but when it gets called while using the query string for XSLT publishing, the wrong layout is showing up.  My script chooses which layout to use base on the account that logs in. Here is my string:

.../WebTest3/recordlist.xsl?-db=my_db &-lay=Pro2&-grammar=fmresultset&-script=WebStartup&-find

Now notice that I have -lay=Pro2 set but I only do that because without it, I get a parameter missing error for the query string. I have tried to move the seting of the script ie. -script, all along the query string but ultimately I still end up with -lay layout, not the one I that is supposed to get.

Any help or direction would be very much apprieciated.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

To switch a layout from the web companion, you can use a button in the default layout which calls a script that switches from the default layout to another one. This is the only way I know...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Can you post the script itself?
script? it is a regular FM script, 1 line, "display layout xxx." (or whatever in english)
if a given layout has a button to trigger that script, then you can see what kind of syntax the web companion is using in the URL when you click on it from your browser. If you have problems to capture it, stop filemaker just before clicking on it, it will give you some time to copy before it times out, unless it is stored in the history? never checked that...
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Um, Lesouef, I was actually asking Tarek316 to post the script he is using...
ah, ah... I always read the last post! and logically thinks its an answer to the previous one...
Ctrl Z [enter]
Was the script having another layout call? You'll never know, since he never sent the script!
I have a friend like this: if asks himself silly questions, and when he asks me, by the time I can answer, he finds what's wrong: so asking the right question is 50% of the fix, so I am not suprised that many people give up their question, they found the fix just because they had to explain the pb. Not very fair for us, they could let us know which would be better and get their pts back on top...
No objection from me.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.