Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Navigation for FM client and IWP


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

Recommended Posts

Posted

I'm migrating a 54-table database (ie 54 files) from FM5 to 9. Navigation from one table to another has been using an "Open file" script step on a button. That script step is not IWP compatible. How can you script navigation that works on FM client (our power users) but also on IWP (for our regular users)? I could use an open URL script step, but that would presumably foul the FM client "open file" step.

Posted

If the tables in the other file(s) are referenced at all in a layout of another file, it will automatically open the other file as hidden.

I would consolidate what files you need to into just a few files.

Posted

Thanks John

From comments on consolidation, I think that is a task and a half! Opening related files as needed is not a problem, since they're all server hosted.

My navigation buttons enabled a quick jump to layouts in separate files, for example to meet the requirement: "you are looking at events we are running and people attending (one subset of tables): now go straight to look at our publications (new but related set of tables)".

But you can't, for example, script to just go to a layout in the required table instead of using "File Open" because you can't select them. And you can't use a script in the required table to present that layout because it remains in the background.

For a totally IWP solution you can of course go to the home page and out again, or set a script/button to open an IWP URL. But it seems you can't have a script that will jump you to another table both when you are in client FMPro or in IWP.

If you could test whether the user was in client or a web browser, then a conditional script could switch the script options, but I can see how to test that! I can understand the security issue.

Posted

Thanks Tom

"Select Window" has meaning for FM Pro but not IWP, where the window has become the single browser window (ie a cached result display rather than the real thing).

Testing for extended privileges is interesting, but I don't know a script step for it, and I think that this would require separate user logins with privileges only defined for either FM Pro or IWP.

Fundamentally IWP is arms-length from the server doing the work, and I realise my FM Pro navigation buttons have quite distinct functions for each scenario.

The obvious answer is to build IWP layouts for IWP and FM Pro layouts for Pro clients; so there's a new project for me! Shame, because first impression of IWP was that it would do everything - a technical naivete on my part!

Posted

Windows do indeed have meaning in IWP. You can open and close *virtual* windows. From the IWP guide: "Select Window - Brings the specified virtual window to the front."

Test it yourself, it works. You have a script in file A like so:

Perform Script( "Contact List" from file: "B" )

In file B, your Contact List script looks like this:

Go to layout(...)

Select Window(current window)

If that still doesn't work, then something else is going on. Access privileges are always worth double-checking, especially with so many files. Each one has to have IWP privileges for the account that is trying to access it.

As for scripting, it's not too complicated to test and branch based on IWP access. For example, Get(ApplicationVersion) will return "FileMaker Web Publishing" via IWP, so:

If( Position( Get(ApplicationVersion); "Web"; 1; 1 )

... do your IWP stuff

Else

... do your FM stuff

End If

Since you don't have a special privilege set for IWP, that's your best option.

If you did have an IWP privilege set, then you'd script as above but you'd have the option to test for the name of the set, e.g.:

If( Get ( PrivilegeSetName ) = "Web User" )

...etc

Forget what I said about Get(ExtendedPrivileges) -- that will indeed tell you if the IWP is available, but not whether the current client is actually connecting via IWP.

Posted

I'll add that since you are converting from FM5, you're going to need to add the Select Window step all over the place anyway, even for non-IWP uses. Unlike FM5, FM9 doesn't necessarily bring a file to the front when you run a script in that file.

Posted

Thank you!

Just the right answer to place a script in each table to go to top level layout and select that window, then use it as a remote script wherever required. Bit of a slog through a pile of scripts, but worth it for tidying up too.

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