• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

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.

Thanks.
0
tarek316
Asked:
tarek316
  • 4
  • 3
1 Solution
 
lesouefCommented:
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...
0
 
billmercerCommented:
Can you post the script itself?
0
 
lesouefCommented:
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...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
billmercerCommented:
Um, Lesouef, I was actually asking Tarek316 to post the script he is using...
0
 
lesouefCommented:
ah, ah... I always read the last post! and logically thinks its an answer to the previous one...
Ctrl Z [enter]
0
 
lesouefCommented:
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...
0
 
billmercerCommented:
No objection from me.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now