Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

FM scripting problem

FM scripting problem

FM scripting problem

I'm a complete newbie to FileMaker scripting. I want to open a bunch of files (easy) and, for each one, open the Sharing dialog box and tick the 'Web Companion' box. While I can use 'Open Sharing' to open the dialog box, how do I set 'Web Companion' to On? Is it possible?


RE: FM scripting problem


What version of Filemaker are you using and are you asking how to script the checking of the checkbox or just how to manually check it?


RE: FM scripting problem


I'm using FM5 and I want the script to check the Web Companion checkbox for each file the script opens. I would settle for being presented with the dialog box so that the user checks the checkbox but I tried that and it didn't work properly. The existing script opens the files one after another. I inserted 'Open Sharing' after each 'Open [filename]'. When the script ran it opened file1 and presented the checkbox for file1. When I checked the checkbox and clicked OK it opened file2 and presented the dialog box for file1 again (with the checkbox already checked).

RE: FM scripting problem


I'm sorry but I can't help you.  I never used Web Companion and it has been a few years since I've done anything with version 5 so my memory has faded and I have no old version to refer to.

Jean may be able to help.  She is a obviously a FM guru and I suspect that her memory is better than mine.

My guess is that it can't be done.  Generally speaking, database setup like this can't be scripted in Filemaker.


RE: FM scripting problem

Maybe I'm missing something, but I strongly advise against this.
Never let a user change those settings.
They have to be set by the developer or the 'administrator' and have to be the same for all the files in the application.
Not, shared for one file and not shared for another.

With the Open... script steps you can reach the settingscreens to change settings, but again, never give that into the hands of a user.

Maybe if you can tell us the 'why', we could help you better.

@ Striker. My memory is not better than yours...older maybe, yes, but not better... smile

RE: FM scripting problem

The reason for checking the 'Web Companion' checkbox on those files is that we are using a standalone machine running FM5 to 'present' those files to a web application that sucks the data out of them and passes them to a web page. The machine does not have a user, it just opens the files and the 'Web Companion' box needs to be checked to make them available.
I'm just trying to automate opening the files (already done) and checking the 'Web Companion' box (manual process at present).

I guess my question boils down to: is it possible to 'get at' the individual elements within a dialog box from a script?

RE: FM scripting problem

Well, then the answer is that you can get until the setting screen with a script, no further.

Once there, you have to navigate to the right screen and check the settings.

As the scriptsteps indicate, it's only Open.....

To automate that, to a certain level, for all the files you can 'loop' through the fles in the application and call each script separately.

To be sure you 'hit' all the files in the application, you could make a list of the available files and make a check against the running script.

You could use two portals, one with the 'filepool' and one with the already checked files.
After each file, change the setting of the file, which will put the filename in the checked file list.
As long as your pool is not empty, you know yu didn't hit all the files in the application.

RE: FM scripting problem

To make it clear, each script has to be called from within each file.

The 'central calling' can be done from within one masterfile. Otherwise you will always open the application within the same calling file, what is what you mentioned in your post.

But I would re-think the design, to make it sure only one file is open to the web. Or at least look if it is possible to have no more then 1 file open to the web.
Think about it as a separation model, where you have 1 file open to the user, while the data is in another file, only acessible through relationship.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close