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

privilege set based on get (accountName)


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

Recommended Posts

Posted

Hi,

I have a privilege set called Standard User, In this users are limited to what records they can view with if ( UserField = get ( accountName ))

My problem is that in form view, when a user clicks the background the fields fill with

I am guessing that is because in my if statement there is no longer a record to access UserField and so it returns False.

I have had a good look and cant see a workaround..

if anyone has got a solution, or a better way of separating different users data, i would really appreciate it. ??? )

Thanks, Moaa

Posted

Are you limiting which Fields they can see or which Records they can see?

If it's certain fields, then you could use 2 different layouts. If it's certain records, you could use 2 different tables.

Posted

I have a table called holiday request with; Start Date, End Date, Comment, User.

I am limiting the records in this table that the user can see - so they can only see their own (User is autoentered as account name).

How do you mean two tables, as in one for each user?

Thanks, Moaa

Posted

Ah, ok then you won't want to do multiple tables. You could make a script that runs when the person wants to look up their holiday requests. The script would do a find just for their requests.

You could have the layout so they can't navigate to it, and disable navigation while they are in that layout then have another button that puts them back to a default layout. Allow Toolbars Show/Hide Status Area

Posted

This is the kind of setup i have at the moment but..

users are limited to what records they can view with if ( User = get ( accountName ))

My problem is that in form view, when a user clicks the background the fields fill with

I am guessing that is because in my if statement there is no longer a record to access User Field and so it returns False?

any ideas? any way of not allowing deselection of records or something like that, or script triggering on record deselct?

Thanks, Moaa

Posted

hmm, im not sure im describing my problem very well..

i have the user settings in place so each user has their own set of records within the table and only their own are accessible by them.

These are presented fine in list view.

But, if the user goes into form view and clicks on the background - and therefore deselecting the record that is being viewed, my if statement in access and privileges fails to work. I believe this is because "if ( user = get ( AccountName ))" cannot get the active record and so cannot get the value of field "user" to compare to "get ( AccountName )"

Hope this makes it more clear

Thanks for your time, Moaa

Posted

Clicking on the background in Form view does NOT deselect the record. It commits the record - IF user has been modifying it (and the layout is set to commit automatically). Otherwise it does nothing.

You should check the actual contents of the User field, and compare it to the account name. There are two other points that bother me:

1. How exactly do users switch to Form view? Do they switch the view of the same layout, or are there two dedicated layouts? If two, did you set any custom privileges for the Form layout?

2. What EXACTLY is the condition under which users can view records? You say it is:

if ( UserField = get ( accountName ))

but that's not possible, because that is not a valid expression.

Posted

OK, so it could be that i have to turn of automatically committing the record... Unfortunately its on my computer at work so i will have to wait till tomorrow (im in the uk).

This part of my database is to request holiday leave so there is one layout in list with all the pending requests, and to make a new request you are taken to a new layout in form view - the one i am having these problems with.

I know that the account name matches up to the User field as i have tested it with multiple users and they always get their own records and no one else's.

I did set custom privileges on the form layout.

by if ( UserField = get ( accountName )) i meant UserField = get ( accountName ) (my bad)

Thanks! Moaa

Posted

Automatically committing records should have no effect on user access - unless there is something like an auto-enter or a script trigger that modifies the value in UserField upon committing.

I did set custom privileges on the form layout.

And they are...? You should also make sure that the Form layout is set to show records from the same table.

All things said, if this happens with new records only, then the most likely explanation is that UserField is NOT getting populated as intended. In such case user would be able to fill out a new record, and lose access upon committing it - exactly as you describe.

Posted

Do you have the Account Name being Auto Entered by Creation or by Modification?

Have your users started using this database yet, or are these just happening as you are testing?

Do you have this set up as a stand alone file or is it on FM Server?

Posted (edited)

Privilege set for holiday request table:

View - limited by User = Get ( AccountName )

Edit - No

Create - Yes

Delete - No

Field access - all

All things said, if this happens with new records only, then the most likely explanation is that UserField is NOT getting populated as intended. In such case user would be able to fill out a new record, and lose access upon committing it - exactly as you describe.

that makes sense but user is auto entered with:

creation - account name

cant modify

and the user has access to the records in list view

Do you have the Account Name being Auto Entered by Creation or by Modification? - Creation

Have your users started using this database yet, or are these just happening as you are testing? - this is just testing at the moment

Do you have this set up as a stand alone file or is it on FM Server?

At the moment its being served from filemaker pro 10, but the eventual plan is to get it onto a server with fm server as we will have more than 5 clients

Thanks for all your help,

Moaa

Edited by Guest
Posted

Thanks guys your comments got me thinking in a different direction and it turns out that

user is the user who's sending and i only allowed viewing for the reciver, thanks a lot!

Moaa ???

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