Jump to content
rrayburn

Constrain Viewable records by account

Recommended Posts

rrayburn

Does anybody have a good way of restraining the viewable records a user sees when they login to only those that they have account access to? I want to avoid the "No Access" labels in the fields.

 

This seems like it should be a very basic function for a web enabled database but I can't find any documentation about how to accomplish it.

 

I intend to publish an IWP solution using FileMaker 8. Thanks!

Share this post


Link to post
Share on other sites
generalist

Did you ever find a solution to this problem?

Share this post


Link to post
Share on other sites
rrayburn

Actually, I found a way to make it work but it is not as elegant as I would have hoped. Essentially the user has to hit a page that has a continue button that runs a script pulling related records into the found set. I think there should be a way to do it simply by logging in as a registered user. If you have any suggestions I would LOVE to hear them.

 

Thanks a million!

Bob Rayburn

Share this post


Link to post
Share on other sites
CobaltSky
...I think there should be a way to do it simply by logging in as a registered user.

Bob,

If you set a script to run when opening the file (via the File Options dialog), then it will be performed when a user logs in via IWP. It is possible for this script to locate and present only those records to which the user has access.

 

You may, however, wish to review other processes available to the user when they access the file via the IWP interface, to ensure that any actions which would ordinarily "show all records" will instead perform the appropriate "find" to similarly restrict the found set. smiley-wink

Share this post


Link to post
Share on other sites
rrayburn

Thanks Ray,

I actually tried that technique and it did not work to my great surprize. That is why I added the "Continue" link so that the script would run. I was testing it with FM Advanced 8.0.3 on a Mac running OS 10.4.7. It was driving me crazy since I believed that it should be running at startup. Ay suggestions on what to double check?

Share this post


Link to post
Share on other sites
CobaltSky
Thanks Ray,

I actually tried that technique and it did not work to my great surprize. That is why I added the "Continue" link so that the script would run. I was testing it with FM Advanced 8.0.3 on a Mac running OS 10.4.7. It was driving me crazy since I believed that it should be running at startup. Ay suggestions on what to double check?

Hi Bob,

A start-up script should definitely run in IWP if it is configured appropriately. This works correctly on several machines here, including with a file that is hosted from FMPA 8.0v3 on MacOS 10.4.7. In fact I re-tested it here on that exact configuration just now and it worked straight off.

 

A few of the things you should check are:

 

1. Is your script correctly defined as the start-up script (eg. does it run when the file is opened via FMP)?

2. Does the start-up script include *only* web-compatible script steps?

3. Is the start-up script set as executable from all user accounts?

4. Do the user account access privileges permit the start-up script to perform the actions it is configured to undertake?

5. Is the application.log enabled in IWP Advanced Web Publishing Options (under the Sharing/Instant Web Publishing... sub-menu), and does it report any script errors?

 

HTH

Share this post


Link to post
Share on other sites
rrayburn

Thanks Ray,

Yes to # 1-3. I will need to double check on 4-5. I really appreciate the help. I will let you know if I find it. This certainly is kind of you.

 

Regards,

Bob

Share this post


Link to post
Share on other sites
blevey
5. Is the application.log enabled in IWP Advanced Web Publishing Options (under the Sharing/Instant Web Publishing... sub-menu), and does it report any script errors?

when using these features, where is the log located, how do you access it?

 

Regard,

Blevey

 

Never mind, found them.....

Share this post


Link to post
Share on other sites
CobaltSky
when using these features, where is the log located, how do you access it?

 

Regard,

Blevey

 

Never mind, found them.....

Glad you found them.

 

However for the benefit of anyone else who may be wondering, they are saved in files that accumulate log entries and are located in a folder called "Web logs" which in the case of files which are web-enabled from FMP or FMPA, can be found inside the FileMaker application folder.

 

On Windows, these files open into NotePad, on MacOS they open in the Console application.

Share this post


Link to post
Share on other sites
Bodymax18

I know this is an old topic...but I cannot get this to work using Filemkaer 12.0 and iwp. I know you don't have the "on file open" dialog anymore to run the script. I tried triggering it from "on first window open"

 

thanks

Share this post


Link to post
Share on other sites
doughemi

Can you give some more details? "I cannot get this to work" is extremely hard to troubleshoot.

 

What is in the script?

What do you expect to see?

What do you see?

What have you attempted to do to solve the problem?

Share this post


Link to post
Share on other sites
Bodymax18

I have an opening script that "enters find mode, set the account name from the "Get account name" function and performs the find. It works well on the desktop application but does not work when I am logging in using IWP

Share this post


Link to post
Share on other sites
Feirefiz

No experience with IWP myself, but I've gathered from other posts on this forum that some (most? all?) script triggers don't work in IWP.

Share this post


Link to post
Share on other sites

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

×